Recent content by ZeeroHell

  1. Z

    Change Unit Cost on LUA

    Is there a way to Change the Unit Train Cost trought LUA? Execute a XML file with an <Update>, or an SQL file, any way that could change the Unit Train Cost. What I want is a unit with a fixed amount of turns to be built. I have done a check that If Unit isn't being training, the Cost...
  2. Z

    Add a New Unit, for a specific Civilization

    Thanks for your help, helped me to solve this, if anyone wants it, here is it: GameEvents.PlayerCanTrain.Add( function(playerID, unitTypeID) local glPlayer = Players[playerID] if (glPlayer:GetCivilizationType() == GameInfoTypes["CIVILIZATION_MYCIV"]) then if (GameInfo.Units[unitTypeID] ==...
  3. Z

    Add a New Unit, for a specific Civilization

    Currently, glPlayer is set by: local glPlayer = Players[0]; for mPlayer=0, GameDefines.MAX_MAJOR_CIVS-1 do local pPlayer = Players[mPlayer]; if (pPlayer:IsAlive()) then if (pPlayer:GetCivilizationType() == GameInfoTypes.CIVILIZATION_MYCIV) then glPlayer = Players[mPlayer]; end end end
  4. Z

    Add a New Unit, for a specific Civilization

    Events.SerialEventStartGame.Add( GameEvents.PlayerCanTrain.Add( function(playerID, unitTypeID) if (glPlayer:GetCivilizationType() == GameInfoTypes.CIVILIZATION_MYCIV) then if (GameInfo.Units[unitTypeID] == GameInfo.Units["UNIT_SACRIFICE"]) then return true; end return true; else if...
  5. Z

    Add a New Unit, for a specific Civilization

    Hello everyone, I'm starting modding Civ this week, and I got to grips with lua fastly, but I'm unable to manage on how could I add a Complete New Unit (With new UNITCLASS), that could be built only by my Civ. Right now, my completely new unit is unlocked to built for every civ, but I want...
Back
Top Bottom