|
Members in Shoutbox
None.
Shoutbox Search
Shoutbox Commands
/w [name] > Whisper
/r > Reply to last whisper /me > Marks as action Shoutbox Information
Moderators may delete any and all shouts at will.
|
Global Shoutbox
Please log in to shout.
[2016-6-16. : 2:42 am] BeatMeistro -- Hey Corbo, Well i was searching around the usual SC beta info sites and try to compile some pics into a zip. Also kinda made a "Improved" version of the beta stargate.[2016-6-16. : 1:26 am] BeatMeistro -- And i am back... after a few set backs... managed to find me some stuff.[2016-6-16. : 1:05 am] Corbo -- poiuy_qwertpoiuy_qwert shouted: well this has been a fun waste of time while bored at work i was bored at work too except then i got busy![]() [2016-6-15. : 9:41 pm] KYSXD -- poiuy_qwertpoiuy_qwert shouted: well this has been a fun waste of time while bored at work Hahaha![]() [2016-6-15. : 9:38 pm] poiuy_qwert -- Corbo, I have practically written it for you Here is the last piece: SCBW_DATA(MTXMTile*, MTXM, 0x005993C4)[2016-6-15. : 9:33 pm] poiuy_qwert -- so it would be more like: int myValue = megaTileArray[MTXM[unit.x/32 + unit.y/32*mapSize.width].megatileGroup].unknown9[2016-6-15. : 9:32 pm] poiuy_qwert -- like: struct MTXMTile { u16 megatile : 4; u16 megatileGroup : 12; }[2016-6-15. : 9:30 pm] poiuy_qwert -- and I would probably get rid of the bitwise work and make a bitfield struct to access those fields[2016-6-15. : 9:29 pm] poiuy_qwert -- KYSXDKYSXD shouted: poiuy_qwert Wow... That could be an improvement for GPTP. (I don't know when it could be used. but still looks almost elegant )) The only thing missing from that line is actually the mtmx pointer, so would just need one SCBW_DATA. cv5 == megaTileArray in GPTP so thats there[2016-6-15. : 9:26 pm] KYSXD -- poiuy_qwertpoiuy_qwert shouted: once you have the pointers hooked up, it could be as simple as: int myValue = cv5[mtxm[unit.x/32 + unit.y/32*mapSize.width] & 0x##].unknown9 Wow... That could be an improvement for GPTP. (I don't know when it could be used. but still looks almost elegant ))[2016-6-15. : 9:22 pm] Corbo -- poiuy_qwertpoiuy_qwert shouted: I have faith you can figure it out you suck ![]() [2016-6-15. : 9:22 pm] poiuy_qwert -- once you have the pointers hooked up, it could be as simple as: int myValue = cv5[mtxm[unit.x/32 + unit.y/32*mapSize.width] & 0x##].unknown9[2016-6-15. : 9:18 pm] poiuy_qwert -- it sounds complex and I don't know how to make it sounds simpler, but once you figure it out you will agree its pretty simple[2016-6-15. : 9:16 pm] Corbo -- No no, you don't get it. Like, I actually don't know how to program such thing ![]() [2016-6-15. : 9:16 pm] KYSXD -- poiuy_qwertpoiuy_qwert shouted: actually the Tile struct is technically the megatile Group poiuy_qwertpoiuy_qwert shouted: At a high level; have a function similar to getTileAt to lookup the megatile group index (also includes megatile group tile index) from the MTXM section. Then use the megatile group index to get the megatile group from the cv5 (megaTileArray in GPTP) poiuy_qwertpoiuy_qwert shouted: EUDDB has the MTXM section: http://farty1billion.dyndns.org/euddb/?pg=entry&addr=0x005993C4&ver=1.16.1&plat=win Oh! Now it's starting to make sense.[2016-6-15. : 9:16 pm] poiuy_qwert -- The MTXM section's format: http://www.staredit.net/wiki/index.php/Scenario.chk#.22MTXM.22_-_StarCraft_Terrain[2016-6-15. : 9:15 pm] poiuy_qwert -- EUDDB has the MTXM section: http://farty1billion.dyndns.org/euddb/?pg=entry&addr=0x005993C4&ver=1.16.1&plat=win[2016-6-15. : 9:14 pm] poiuy_qwert -- At a high level; have a function similar to getTileAt to lookup the megatile group index (also includes megatile group tile index) from the MTXM section. Then use the megatile group index to get the megatile group from the cv5 (megaTileArray in GPTP)[2016-6-15. : 9:13 pm] Corbo -- I get it. Because that's just the struct for each tile, but the program will not work what type of tile it is, it will just know it is a tile, so you have to make it figure out its tile index in the map and then figure out what "type" of tile it is with that ID, or something like that no? like you have to cross search between the map and the struct[2016-6-15. : 9:07 pm] Corbo -- so it will work by just duplicating activetile and modifying accordingly?[2016-6-15. : 9:06 pm] poiuy_qwert -- KYSXDKYSXD shouted: Isn't the TILE struct the megaTile struct? Yeah[2016-6-15. : 8:57 pm] Corbo -- poiuy_qwertpoiuy_qwert shouted: well it depends how getTileAt works I basically just copied getActiveTileAt its more involved then the ActiveTile stuff, like you have to lookup the tile index in the MTMX section of the map and then lookup the TILE going through the cv5 and edited to use TILE instead ![]() [2016-6-15. : 8:55 pm] poiuy_qwert -- well it depends how getTileAt works its more involved then the ActiveTile stuff, like you have to lookup the tile index in the MTMX section of the map and then lookup the TILE going through the cv5[2016-6-15. : 8:51 pm] poiuy_qwert -- ah just took a look at the ActiveTile struct, my thought was wrong[2016-6-15. : 8:49 pm] poiuy_qwert -- how have you confirmed that? did you check all the unknowns? did you check for unused flags in the fields that are not unknown that you could leverage?[2016-6-15. : 8:47 pm] Corbo -- poiuy_qwertpoiuy_qwert shouted: so you should be able to use ActiveTile, unless those don't actually copy the unknowns from the tileset files it doesn't.[2016-6-15. : 8:47 pm] poiuy_qwert -- so you should be able to use ActiveTile, unless those don't actually copy the unknowns from the tileset files[2016-6-15. : 8:47 pm] poiuy_qwert -- no, but it is a representation of those tiles for the active game, so the values in the ActiveTile are from the tileset struct, just updated to represent the "active" state[2016-6-15. : 8:46 pm] Corbo -- so what I am doing right now is just duplicating all of the activetile related code and modifying it to use TILE struct instead ![]() [2016-6-15. : 8:45 pm] Corbo -- ActiveTile is not this: http://farty1billion.dyndns.org/euddb/?pg=entry&addr=0x006D5EA0&ver=1.16.0&plat=win[2016-6-15. : 8:45 pm] poiuy_qwert -- oh i think I get what you were talking about. Yeah you could copy ActiveTile struct and name it "MyModActiveTile" and create another pointer to the ActiveTile array and use the updated struct to access the unknown with a valid name, without having to modify GPTP internals[2016-6-15. : 8:42 pm] poiuy_qwert -- CorboCorbo shouted: It would be easier if I could just make my own SCBW_DATA type to call it and so I can edit the unknown flags with something like pyTile I think what you actually mean is you don't like the idea of using the name "unknown" in your code, so you can just rename the property on the ActiveTile struct: https://github.com/SCMapsAndMods/general-plugin-template-project/blob/7c7fb430c508e3343ebe11c8f92654f6e2e16ef0/GPTP/src/SCBW/structures.h#L212[2016-6-15. : 8:37 pm] poiuy_qwert -- SCBW_DATA is just a convenience macro to create a type safe pointer access to already existing BW memory: https://github.com/SCMapsAndMods/general-plugin-template-project/blob/7c7fb430c508e3343ebe11c8f92654f6e2e16ef0/AiResourceInflater/SCBW/scbwdata.h#L11[2016-6-15. : 8:37 pm] KYSXD -- poiuy_qwertpoiuy_qwert shouted: Corbo What? That doesn't really make sense, you don't need to do anything to edit the unknowns in PyTILE and then read them (as long as those unknowns are actually copied into the active tiles) Yeah, just edit them in PyTILE and manage them in GPTP. Just remember what member are you playing with,[2016-6-15. : 8:35 pm] poiuy_qwert -- CorboCorbo shouted: It would be easier if I could just make my own SCBW_DATA type to call it and so I can edit the unknown flags with something like pyTile What? That doesn't really make sense, you don't need to do anything to edit the unknowns in PyTILE and then read them (as long as those unknowns are actually copied into the active tiles)[2016-6-15. : 8:33 pm] Corbo -- It would be easier if I could just make my own SCBW_DATA type to call it and so I can edit the unknown flags with something like pyTile[2016-6-15. : 8:32 pm] KYSXD -- CorboCorbo shouted: KYSXD KYSXD That'd be the easy way, but you'd have to consider that there's unbuildable, walkable tiles on several tilesets, like i can think of desert spikes That's where you add your modifier based on the tileset. There are only 8 tilesetTypes, and the you could use if/switch to check the tilesetType and run your desired behaviour[2016-6-15. : 8:26 pm] poiuy_qwert -- CorboCorbo shouted: and this: inline ActiveTile& getActiveTileAt(s32 x, s32 y) { return (*activeTileArray)[(x / 32) + mapTileSize->width * (y / 32)]; } CorboCorbo shouted: like, all of this allows me to just do (in gptp) do like ActiveTile currentTile; currentTile.hasCreep; Yeah that sounds fine, what is the issue?[2016-6-15. : 8:25 pm] Corbo -- KYSXDKYSXD shouted: Corbo Maybe you could just assume alwaysUnbuildable+walkable tiles are your desired tiles and set a modifier based on tilesetType KYSXDKYSXD shouted: Just care with ramps That'd be the easy way, but you'd have to consider that there's unbuildable, walkable tiles on several tilesets, like i can think of desert spikes![]() [2016-6-15. : 8:23 pm] Corbo -- NudeRaiderNudeRaider shouted: " gain acceleration when walking on lava" cause, you know, it's burning ![]() ![]() |