|
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-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 ![]() ![]() [2016-6-15. : 8:20 pm] Corbo -- like, all of this allows me to just do (in gptp) do like ActiveTile currentTile; currentTile.hasCreep;[2016-6-15. : 8:18 pm] Corbo -- and this: inline ActiveTile& getActiveTileAt(s32 x, s32 y) { return (*activeTileArray)[(x / 32) + mapTileSize->width * (y / 32)]; }[2016-6-15. : 8:18 pm] Corbo -- like, I think I'd need a line like this: SCBW_DATA(ActiveTile**, activeTileArray, 0x006D1260);[2016-6-15. : 8:17 pm] Corbo -- but I don't know how to implement it so I can write a function that allows me to know when X unit is on top of X tile.[2016-6-15. : 8:14 pm] poiuy_qwert -- CorboCorbo shouted: jjf28 but I don't know how to do that Maybe this is the offset you need: http://farty1billion.dyndns.org/euddb/?pg=entry&addr=0x006D5EA0&ver=1.16.0&plat=win![]() [2016-6-15. : 8:01 pm] Corbo -- jjf28jjf28 shouted: Corbo just get the tile number and traverse the tileset structs yourself but I don't know how to do that ![]() [2016-6-15. : 7:53 pm] jjf28 -- apologies Zoko-TkZ, just got a job offer so Ima push UnitViewer back 2 days ![]() [2016-6-15. : 7:52 pm] jjf28 -- CorboCorbo shouted: ActiveTile seems to have a different struct than Tile anyway, so I can't use this function. D: just get the tile number and traverse the tileset structs yourself[2016-6-15. : 6:18 pm] KYSXD -- CorboCorbo shouted: I'm trying to make some sort of physics simulation where units would slide when walking on ice, or have special effects on them like burn + gain acceleration when walking on lava, etc... Maybe you could just assume alwaysUnbuildable+walkable tiles are your desired tiles and set a modifier based on tilesetType[2016-6-15. : 5:59 pm] Corbo -- ActiveTile seems to have a different struct than Tile anyway, so I can't use this function. D:[2016-6-15. : 5:56 pm] poiuy_qwert -- CorboCorbo shouted: is index something embedded in tile properties? no, its just its index in the array of tiles[2016-6-15. : 5:40 pm] poiuy_qwert -- I think it might be because your cv5 has an uppercase extension. Try renaming it to .cv5 instead of .CV5 |
DarkenedFantasies