Announcement

Collapse
No announcement yet.

Quick and Dirty Modding tool

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Quick and Dirty Modding tool

    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:

    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');
    	}
    }
    ... 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

    L8r.
    Last edited by Madd_Mugsy; May 28, 2004, 12:58.

  • #2
    [deleted]

    (why can't i actually delete my own posts? weird)
    Last edited by Madd_Mugsy; May 28, 2004, 12:55.

    Comment


    • #3
      [deleted]

      Comment


      • #4
        [deleted]

        Comment


        • #5
          okay here we go. for some reason i couldn't post the file.
          Attached Files

          Comment


          • #6
            1 download Not much interest in this I guess.

            Just tested last night, the new fortify-upgrade works in multiplayer, but does anyone know how to get at the sleep button click-event?

            Comment


            • #7
              I am very interested Madd_Mugsy, but I have had a very busy week and I must admit I am not sure how to use the VBA function.

              I am the one who downloaded the file.

              I won't have the time to make any test before the next week though.
              "Democracy is the worst form of government there is, except for all the others that have been tried." Sir Winston Churchill

              Comment

              Working...
              X