Closed ja2-derek closed 4 years ago
Cool stuff, nice investigation!
We can script the data extraction with https://github.com/ja2-stracciatella/ja2-open-toolset and other python tools if needed.
If extended, it could also take care of the item swapping. Though I don't understand the problem, are their indexes different or why do vanilla ones show up?
Point three is the easiest.
I think new items were added in WF. Some items, such as ammos that exist in Vanilla, are working. I am yet to check if WF is only adding new items, or if it also replaces existing ones.
There are indeed WF-only items, for example this one in Drassen SAM site. In Wildfire, it gives 2 "LAW rockets". This is the "ammo" for the re-usable and reload-able LAW only in WF.
In JA2S, it becomes "SMALL NAME". And the game glitches here sometimes. I have got a crash once, and another time seen the item appearing like a used LAW, which I suppose is some kind of default fallback.
Good, so it sounds like we'd just need to extend our externalized json tables and probably add some existence checks to the code.
I have looked at the ITEMDESC.edt. It looks like WF added some new items, replaced some weapons (e.g. Rocket Rifle removed, Colt .45 replaced with UMP). Keys and other plot-significant items seem to be unchanged.
Wildfire on the left ; Vanilla on the Right Both files are the Steam versions (WF v6.04).
Do you know of any tools that can export .EDT as text or json, so I can produce a full diff?
Seven said: EdtMegaEditor
I have been using EdtMegaEditor, but I didn't realized I can save as .TXT 🤦♂
Anyway, full diff below. WF has only used a few empty slots for new weapons. Some useless items (cigar, golf club) are replaced by weapon items. So if JA2S can ignore undefined items, it should not break gameplay too much. But of course, game balance will be a different issue.
Implemented the installation script. You can try Wildfire Maps using this:
https://github.com/ja2-derek/ja2-stracciatella/tree/wildfire-maps-mod/assets/mods/wildfire-maps
Wow, nice job! If you're interested in finishing this, I suggest we keep this bug as the meta overview one and you open new subreports as needed.
The city sector externalizatoin is the easy part. Weapons we already have the same way (eg. assets/externalized/weapons.json), so it's mostly a matter of checking if any new hardcoded needs are there or changed, then adapting the externalized files (I guess also the merchant inventories). If it's not the case yet, ensuring mod data overrides these files as well, since it's likely we can't ship it by default (ok, it could be a separate task to generalize this out).
Also, if you want, we can move the repo under this github organisation.
There are indeed quite a lot more to work on, to get this fully working. I am going to use this comment to track the work breakdown as you said. I will come back and update this as I go deeper.
Not sure how much further I can go. I don't think I can complete everything all alone. But the externalization should benefit the project anyways.
smguns.sti
, SMITEMS.STI
, smp1items.sti
, smp2items.sti
, SMP3ITEMS.STI
)With the suggested name, location in codebase and updates for WF maps (see also #665):
army-garrison-groups.json
army-patrol-group.json
army-compositions.json
- StrategicAI.cc: gOrigGarrisonGroup[]; Add garrison groups to new town and roadblock sectors (#1025)strategic-map-towns.json
- StrategicMap.cc: InitializeStrategicMapSectorTownNames(void); Map_Screen_Interface_Map.cc: sBaseSectorList[]; A1,B1,C14,F2 are now town sectors (#1024)strategic-map-movement-costs.json
- Strategic_Movement_Costs.cc: g_traverse_we, g_traverse_ns and g_traverse_through; A1,B1,C14,F2 are now town sectors (#1021)strategic-bloodcat-placements.json
- Game_Init.cc: InitBloodCatSectors, missing placements at C3, D4, G6, G12, K6 ,K10. (#1018)strategic-map-npc-placements.json
- Strategic_Event_Handler::HandleEarlyMorningEvents; Missing vehicle placement (Hamous and his truck) at D3 and G6.dat (#1029)strategic-map-sam-sites.json
- pSamGridNoAList[], pSamGridNoBList[], update the SAM controller computer gridNo; pSamList[] not changed in WF (#1059)strategic-map-underground-sectors.json
: Campaign_Init.cc: BuildUndergroundSectorInfoList. New UG sectors in Wildfire: f8_b1.dat, h13_b1.dat, i13_b1.dat, m2_b1.dat, m3_b1.dat, m4_b1.dat, n4_b1.dat, n5_b1.dat, o4_b1.dat (#1074)tactical-npc-action-params.json
strategic-fact-params.json
- Interface_Dialogue.cc: HandleNPCDoAction(); Quests.cc: CheckFact(), CheckNPCAt() (#1061)Noticable but do not cause game to malfunction, crash or stuck. Nice to get fixed but not show-stopper
shipping-destinations.json
: Arriving items lie in weird locations: BOBBYR_SHIPPING_DEST_GRIDNO
(#1077)strategic-map-creature-lairs.json
: Creature insertion (town attack) and warp insertion (Travel to surface prompt) have the wrong gridNo. Refer to GetWarpOutOfMineCode and gsCreatureInsertionGridNo in Creature_Spreading.cctactical-gridnos.json
: List of various special gridNos, identified by a combination of sectorID and a string name
captureItems
at I13 and N7: Captured/Interrogated soldiers' item are placed on an open tile. It is supposed to be crate/locker grids. (sAlmaCaptureItemsGridNo => [8552,8552,8552]
and sInterrogationItemGridNo => 13506
)staircase
at P3: Queen goes down to basement at the incorrect gridNo. STAIRCASE_GRIDNO
should be changed to 11727
.BuildListOfTownSectors
causes buffer overrun when it goes past the last element (#1016)base
was null at the last line. Worked around with a null check. Need to check why. The sector was G8. (#1065)while(1)
loop, with sCurrGridNo
=25487, sRightGridNo
=25486,bDirection
=4,sStartGridNo=20056
(#1063)To be investigated one by one. Ignore if not changed in Wildfire maps
gsBoxerGridNo
~same gridNos in WFIN_DEIDRANNA_ENDGAME
~ Tested, no problems with end game scenepSoldier->gridNo
checks in ProcessImplicationsOfPCMessingWithDoor does not seem to do anything. There is a room check alreadyNPC_ACTION_GOTO_HIDEOUT
(ExitGrid.usGridNo)~ No changes needed for Rebels' HideoutWARDEN_ALARM_GRIDNO
, WARDEN_GAS_GRIDNO
both unused. sAlmaCaptureGridNos
, sAlmaCaptureItemsGridNo
, sInterrogationItemGridNo
- AlmaCaptureGridNos are good; AlmaCaptureItems grid is an open tile right at a door; Queen Interrogation works, but items are placed in the open outside of the facility (sInterrogationItemGridNo)START_SECTOR_LEAVE_EQUIP_GRIDNO
, 10433
.~ It is some random open tile on map. Does not really matter.Some Wildfire features or differences here. Some may be interesting to have, but should not be in scope for a map mod. They could be a separate WF gameplay mod in the future.
I don't have WF, so can only pontificate. What don't I understand about 095.npc? Doesn't just replacing the file work?
I don't have WF, so can only pontificate. What don't I understand about 095.npc? Doesn't just replacing the file work?
~Oh yes. How come I didn't think of that? Updated.~
EDIT: Wildfire Kyle has slightly different behavior. He does not go to the back room, but gives the money right away. No NPC_ACTION_KYLE_GETS_MONEY
in Wildfire, I suppose. It should be easier to patch GridNo in the NPC script, than altering the NPC interaction code.
OK, the packaging is done for the installer. https://github.com/ja2-derek/mod-wildfire-maps/releases/tag/0.1.0
Nice. Did you consider the installer taking an optional path to WF, so it could copy slfs itself?
Installer updated: https://github.com/ja2-derek/mod-wildfire-maps/releases/tag/0.2.0 (README.txt)
--src_dir
command arg, or launches a GUI prompt if display is availableCool. Looks like just a bit more is needed to obviate the need for point 3 in the README.
What's with the other npc files? I thought that just preserving the version from Wildfire is enough and we don't need to care.
I am hand-picking which NPC files to use. It is because some NPCs have dependencies on WF version of quotes, speeches or code logic. I want to keep this mod to only maps if possible.
So by default I am using the vanilla NPC. If there are path changes, use the Wildfire version. There is one exception case KYLE, which I am patching the vanilla file to work with the WF map
So I guess that's blocked by the interpreter discussion, ok. Can you then verify the other grid todos before jumping to UB?
Yes I am still on it. I am going to finish a playthrough with WF maps, and verify each and every one of the Grid TODOs.
If there are no blocking issues with GridNos, I will update the installer. Then it should be ready for release targeting 0.17.
I'm going to close this issue, as all of the necessary changes are merge and good for 0.17 release.
Creature Lair externalization will be handled with #1087.
Tactical gridNo stuff will be deferred
Latest version of installer script: https://github.com/ja2-derek/mod-wildfire-maps/releases/tag/0.2.1
Can that repo be moved into the official ja2-stracciatella org?
Re issue: yeah, please open a new one and migrate what's left to do for a full WF experience.
Repo: yes, please. Do you have the option already?
I would like to invite you to become part of the github team — it's well deserved and might be needed for the migration. @flaviojs any objections?
No objections. 👍
Ok, done. Welcome aboard! :fireworks:
In case it wasn't obvious @ja2-derek, we all work on the main repo indirectly through PRs (master branch is marked as protected).
I'll write something for the website features page as soon as you move the repo, so the links won't break.
Thank you!
Moved repo: https://github.com/ja2-stracciatella/mod-wildfire-maps
Done on my side as well. So then please just open the new issue and this one is done done.
https://ja2-stracciatella.github.io/features/#bundled-optional-mini-mods
I was bored with the vanilla maps, so I tried playing on Wildfire maps with Straciatella, and I got a working proof-of-concept. I probably is not the first one to try, but I wonder how much interest there is. I may be able to help make this into a JA2S mod.
I am able to get in-game with WF maps, though I haven't completed a play-through nor tested extensively. I am reporting my progress so far, hoping some of you would also be interested:
Using Wildfire maps
These are what I did so far:
Known issues
What can be done
If there is interest, we can make it into a modpack and provide basic (and experimental) support of Vanilla-like experience on WF maps.
Regarding items differences, I don't know if we can ignore or somehow replace those WF items. I don't know how JA2 1.13 handle those issues.
For the strategic map differences, we can externalize Sector Info and Garrison Groups and make them mod-overridable.
Screenshots