Jump to content
  • Sign Up
0 votes
Guests cannot vote

XS/TR/AI Functions to fix or add.

  • Views: 11
  • Submitted:

1) Fix "place second building over socket unit" exploit that results in free Town Centers (also uncompleteable TCs if number of builders changes mid-build) See:


2) Fix Rain GP increasing Wood gather rate.
3) MAJOR BUG: Population counts may reset to 0 on reloading a saved game (seems to occur for all players, generally in late-game for unknown reason).
4) Fix aiChat(), kbUnitGetResourceAmount() functions.
5) Modify/Fix aiTaskUnitEject(int unitID, int containerID).
   ContainerID MUST be passed and equal to building containing UnitID (which is combersome and seems unnecessary),
   BUT it cannot be used to teleport across different Sky Passages either (which is the only reason it would make sense).
6) Let BuildingWorkRate, ResearchPoints, Icon/PortraitIcon, RolloverTextID, etc etc (as many fields as possible) be modifiable via techs. BuildingWorkRate should work on units who train/research too (currently ignored on non-buildings).
7) trPlayerGrantResources() The "amount" param typeshould be changed from int to float, or aiResourceCheat() should work in multiplayer/RMs.
8 ) Fix "TCs can't be built near allied settlements in treaty mode".
9) Implement short-circuiting in XS (you probably know what that is but if not: https://www.geeksforgeeks.org/short-circuiting-in-c-and-linux/ )
10) Implement inlining in XS, if not already done.
11) trUnitChangeName() should work in all cases, Single Player, Multiplayer, RMs...
12) Dead units with the HeroDeath flag shouldn't be buildable on. At minimum, corpse shouldn't disappear if build upon.
15) Mod Functions that would be wonderful:
  - int aiTaskUnitCancelTrain(int unitID, int protoInTraining, int numToCancel=999999) (Return: Num of units canceled)
  - int kbTechGetResearcherID(int techid): Returns ID of unit that researched/is-researching techid. -1 if tech is not active/researching or activated via trigger.
  - kbUnitQuerySetAnimationActionType(int queryID, int actionID) 😄
  - kbGetPlayerName(int playerID) 😄
  - kbGetTechID(string name): Like "kbGetProtoUnitID" but for techs.
  - trUnitAddInventory(float amount): Adds (subtract if neg) amount to the inventory of trSelect-ed unit(s). (Ie, replenish/deplete Gold Mines with a trigger!)
  - trProtoUnitChangeName(int playerid, int protounit, string newName): Same as a "SetName" tech effect, but allows triggers to customize.
  - trModifyTechCost(int techid, int playerid, int resourceid, float amount): Like trModifyProtounit(), but with costs of a tech.
  - trModifyTechResearchPoints(int techid, int playerid, float amount): Ditto research points of a tech.
  - trUnitSpawnFrom(int spawnUnitType=-1, int quantity=0): Make trSelected() units spawn <quantity> <spawnUnitType>s. WHILE RESPECTING THE GATHER POINTS OF SPAWNERS!

User Feedback

Recommended Comments

There are no comments to display.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...