The_J
Reaction score
8,882

Profile posts Latest activity Postings Media Resources About

  • Hm, i think no. I edit you original Civil War, but i just rename your mod component.
    There is no message. It's show your pop-up "Bring me his head on a pole, crush this city, I am the ruler here." I click on that or press enter. And it's show again and i do the same again. And nothing happens, I go end turn, after that, condition for the event is filled in this new turn, i do all again and nothing happens, the city is still under my command.
    I make detail civil war, i will write this code like this. Would this will work? Do has errors?

    iUnitClassType = CvUtil.findInfoTypeNum(gc.getUnitClassInfo, gc.getNumUnitClassInfos(), 'UNITCLASS_MODERN_ARMOR')
    iUnitType = gc.getCivilizationInfo(player.getCivilizationType( )).getCivilizationUnits(iUnitClassType)

    for i in range(2):
    pNewPlayer.initUnit(iUnitType, iX,iY, UnitAITypes.UNITAI_ATTACK, DirectionTypes.NO_DIRECTION )

    iUnitClassType = CvUtil.findInfoTypeNum(gc.getUnitClassInfo, gc.getNumUnitClassInfos(), 'UNITCLASS_MECHANIZED_INFANTRY')
    iUnitType = gc.getCivilizationInfo(player.getCivilizationType( )).getCivilizationUnits(iUnitClassType)

    for i in range(2):
    pNewPlayer.initUnit(iUnitType, iX,iY, UnitAITypes.UNITAI_CITY_DEFENSE, DirectionTypes.NO_DIRECTION )
    For ConscriptUnit i get units from CIV4UnitInfos with <iConscription> tag which value is higher than 1? That's the difference between ConscriptUnit and iUnitType? iUnitType is units which i define.
    It's work but i must test one more. If i write this:

    iUnitClassType = CvUtil.findInfoTypeNum(gc.getUnitClassInfo, gc.getNumUnitClassInfos(), 'UNITCLASS_HORSE_ARCHER')
    iUnitType = gc.getCivilizationInfo(player.getCivilizationType()).getCivilizationUnits(iUnitClassType)

    #MY COMMENT FOR YOU THE_J: THIS MEAN THAT THIS CODE UPPER GIVE UNITCLASS_HORSE_ARCHER FOR UNITAI_ATTACK and put 2 Horse Archers in city (If is Mongolia, then put 2 Keshiks instead Horse Archers, etc).

    for i in range(2):
    pNewPlayer.initUnit(pCity.getConscriptUnit () , iX,iY, UnitAITypes.UNITAI_ATTACK, DirectionTypes.NO_DIRECTION )

    for i in range(2):
    pNewPlayer.initUnit(pCity.getConscriptUnit () , iX,iY, UnitAITypes.UNITAI_ATTACK_CITY_LEMMING, DirectionTypes.NO_DIRECTION )

    for i in range(2):
    pNewPlayer.initUnit(pCity.getConscriptUnit () , iX,iY, UnitAITypes.UNITAI_CITY_DEFENSE, DirectionTypes.NO_DIRECTION )

    Is this code has errors?

    I for now know only C language, not C++ yet.
    I am try with UNITAI_ATTACK_CITY_LEMMING and its really work, AI use units and attack my cities, thanks for this.

    But can i use more unit types?

    Can i write this in one code, one below the other?

    for i in range(2):
    pNewPlayer.initUnit(pCity.getConscriptUnit () , iX,iY, UnitAITypes.UNITAI_ATTACK, DirectionTypes.NO_DIRECTION )

    for i in range(2):
    pNewPlayer.initUnit(pCity.getConscriptUnit () , iX,iY, UnitAITypes.UNITAI_ATTACK_CITY_LEMMING, DirectionTypes.NO_DIRECTION )

    for i in range(2):
    pNewPlayer.initUnit(pCity.getConscriptUnit () , iX,iY, UnitAITypes.UNITAI_CITY_DEFENSE, DirectionTypes.NO_DIRECTION )
    Hi The_J, i want to ask you about your Civilwar_event. If i want to Al use ATTACK UNITS types when declare their Independence, what part of code i must change? Or if i want some special units?

    Some part of your code maybe this can help:

    pPlot = CyMap().plot(iX,iY)
    iMaxNumUnits = pPlot.getNumUnits ()
    for iUnits in range(iMaxNumUnits,-1,-1):
    pUnit = pPlot.getUnit(iUnits)
    if pUnit.getOwner()==pPlayer.getID():
    pUnit.doCommand(CommandTypes.COMMAND_GIFT,-1,-1)
    for i in range(8):
    pNewPlayer.initUnit(pCity.getConscriptUnit () , iX,iY, UnitAITypes.NO_UNITAI, DirectionTypes.NO_DIRECTION )
    Hello,
    I was wondering if you could approve my new scenario called World War III for Civ4BtS (World 2013 mod). Many thanks :)
    I've got a theory. Isn't there like a thing that stops new users with zero posts from posting URLs? Maybe the post was to get around like that.
    Thanks! Although it seemed pretty obvious. The one thing I don't get was what was the point? Why do people waste time and effort on Spambots that give out compliments?
    Hi J, thanks for feedback.
    But I think the solution can be tricky.
    If the culture is the problem the code must set the city culture to zero at first.
    Than run the rest of the code.
    I test it with a new map but as soon as the city have culture the problem occur.
    I test it to set the culture to zero and use the nuke after this. But it make no difference.
    Somethin is changen when a city become culture.....
    OK anyway i will start my question in the thread.

    Cheers
    Hi. I don't know if you are in charge of the ads on the site, but the ones by Vdopia are quite a pain on the Safari web browser on iPads. They are intrusive and keep returning me to the top of the page until they have done loading.
    Hello The_J !
    I would want to make a small website of civ4. Can I do ? If yes, I have already begun the files, I want to insert picture, as :gold:, :yuck:, :food:, :science:, or other but I don't know how I must do it (in html files). Could you help me, please?
    AdelineJ
    Oh that's too bad. The last time I went to the CiV forum, people were talking about it like the ACW scenario like it was a known fact - this was before the latest patch. People made it seem like the devs were going to add it with the patch. I downloaded the patch today, expecting to find it, but it wasn't there, so I was confused.

    Thanks for clarifying. :D
  • Loading…
  • Loading…
  • Loading…
  • Loading…
  • Loading…
Top Bottom