I just this thing really quick using Excel 2000. If you can work with a spreadsheet you can probably use this sucker
I used a spreadsheet design because it let me edit and compare multiple units at once.
I just finished the SLIC upgrades for the new upgrade via fortify key command. The code looks like this:
... over and over and over again. But I wrote a VBA function to write it all for me this time
It pulls from the spreadsheet and makes an "Upgrade_scr.slc" file (which you'll need to add an include line for). This should work for the AI too everytime it tries to fortify. You'll probably also want to allow all the units to fortify now too. If anyone knows how to access the sleep function instead, that would be much appreciated
I'm attaching the file to this post so you guys can play around with it. Also included are the strings file, the messagebox functions file and a sample upgrade script file. It only does units and advances for now. It also doesn't modify the gl_Str.txt file, although it does read in the unit/advance values from it.
I've got all the advances and units from my mod loaded into it right now, but a simple "read file" button click from the start sheet will erase it all. I'm leaving it there so you can see how I did stuff in the mod (like the upgrade paths and the text files).
Anyway, it's all totally undocumented and only quickly tested, so just ask any questions here and I'll answer as best I can. If someone wants to help me finish it and add the rest of the text files in, be my guest![Wink](https://apolyton.net/core/images/smilies/wink.gif)
L8r.
![Smile](https://apolyton.net/core/images/smilies/smile.gif)
I just finished the SLIC upgrades for the new upgrade via fortify key command. The code looks like this:
Code:
trigger 'UNIT_GREEK_FIRE_UNIT_CROSSBOW_Upgrade' when (unit.fortified && HasAdvance(g.player, ID_ADVANCE_CROSSBOW) && unit.type == UnitType("UNIT_GREEK_FIRE")) { SetString(0,ID_UNIT_GREEK_FIRE); SetString(1,ID_UNIT_CROSSBOW); onecost=200-120; if(onecost<=player.gold) { oldloc = unit.location; if(UnitsInCell(oldloc)>1) { SetOrder(1, 13); AddOrder(unit, oldloc); } SetOrder(1, 56); AddOrder(unit, oldloc); CreateUnit(player, UnitType("UNIT_CROSSBOW"), oldloc, 0); AddGold(player, -onecost); message(g.player,'msgUpgSucc'); } else { message(g.player,'msgUpgFail'); } }
![Big Grin](https://apolyton.net/core/images/smilies/biggrin.gif)
![Smile](https://apolyton.net/core/images/smilies/smile.gif)
I'm attaching the file to this post so you guys can play around with it. Also included are the strings file, the messagebox functions file and a sample upgrade script file. It only does units and advances for now. It also doesn't modify the gl_Str.txt file, although it does read in the unit/advance values from it.
I've got all the advances and units from my mod loaded into it right now, but a simple "read file" button click from the start sheet will erase it all. I'm leaving it there so you can see how I did stuff in the mod (like the upgrade paths and the text files).
Anyway, it's all totally undocumented and only quickly tested, so just ask any questions here and I'll answer as best I can. If someone wants to help me finish it and add the rest of the text files in, be my guest
![Wink](https://apolyton.net/core/images/smilies/wink.gif)
L8r.
Comment