1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Quick Modding Questions Thread

Discussion in 'Civ4 - Creation & Customization' started by kiwitt, Jan 27, 2010.

  1. Civciv5

    Civciv5 Grand Emperor

    Joined:
    Aug 14, 2011
    Messages:
    2,103
    Location:
    Nergenshuizen, Belgium
    I'm about to release my futuristic mod,but I'm still doubting whether I should post it in the scenario or the modpacks section...
    My mod mainly focuses on the scenario and it adds some new things and I will add many more things in the future.
     
  2. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    33,100
    Location:
    DE/NL/FR
    If you really modded stuff, then it should go in the modpacks section.
    I know there are some smaller mods with attached bigger scenarios in the scenarios section, and theoretically I should move them out to the modpacks, but don't do it due to...er..."history".
     
  3. DarkC

    DarkC Chieftain

    Joined:
    May 8, 2012
    Messages:
    55
    hey guys, the settlers problem was partially fixed (can give 2pop but not add buildings) but left it as it is, moved on, but now i stumbled on smth else as i was managing the nuke units. i need to edit the manhatan project but i can't find it. is it in globaldefines, xml or smw else?


    edit:

    found it! thanks The_J :)
     
  4. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    33,100
    Location:
    DE/NL/FR
    GameInfo\ProjectInfos.xml
     
  5. Civciv5

    Civciv5 Grand Emperor

    Joined:
    Aug 14, 2011
    Messages:
    2,103
    Location:
    Nergenshuizen, Belgium
    How do I make sure that some units in my mod use this effect?
    (the blue little jet flames)
    Spoiler :

    Also,how do I have to do to make my skydestroyer unit fly in the air and not in the ground.
    Spoiler :

    Thank you!
     

    Attached Files:

  6. Zlatko

    Zlatko CIW

    Joined:
    Apr 1, 2010
    Messages:
    713
    Location:
    Solar System
    Effects, I've never tried it :\
    I will try to put him in sky just send me unit folder, i am do something similar with Final Frontier units :)



    This is a Future Battleship from my main mod who also in working progress :D
     
  7. Civciv5

    Civciv5 Grand Emperor

    Joined:
    Aug 14, 2011
    Messages:
    2,103
    Location:
    Nergenshuizen, Belgium
    Thank you!
    Here it is!
     

    Attached Files:

  8. Zlatko

    Zlatko CIW

    Joined:
    Apr 1, 2010
    Messages:
    713
    Location:
    Solar System
    Here is your Skydestroyer :)
    "Cruiser2.nif" and "Republic_Acclamator_FX2.nif" in "Skydestroyer2" folder, If there are any problems just tell.
     

    Attached Files:

  9. Civciv5

    Civciv5 Grand Emperor

    Joined:
    Aug 14, 2011
    Messages:
    2,103
    Location:
    Nergenshuizen, Belgium
    EDIT:Fixed
     
  10. Zlatko

    Zlatko CIW

    Joined:
    Apr 1, 2010
    Messages:
    713
    Location:
    Solar System


    I have this problem, when i go i world builder and when i click on "Edit unit mod" and click on any units on field i get message that is in the picture. What to do?
    This same problem exists in Charlemagne mod.
     
  11. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    33,100
    Location:
    DE/NL/FR
    What are you doing with the Charlemagne mod?
    According to the error message there's a problem with one of the unit AI types.
    Not that this helps here much, because I guess you haven't changed anything regarding unit AIs, right?
     
  12. God-Emperor

    God-Emperor Deity

    Joined:
    Jul 18, 2009
    Messages:
    3,551
    Location:
    Texas
    Assuming an unmodified CvWorldBuilderScreen.py then what it is doing is looking for the descriptions of a unit AIs to build the unit AI dropdown menu.

    My guess is that your mod does not have a correct version of CIV4UnitAIInfos.xml (in the BasicInfos folder). If the DLL you are using has added unit AI types then you need that file from the mod so you don't default to the one from BtS that doesn't have the extras. Or you have one in the mod that is not correct - perhaps missing the last entry (UNITAI_ATTACK_CITY_LEMMING), or something along those lines.
     
  13. DarkC

    DarkC Chieftain

    Joined:
    May 8, 2012
    Messages:
    55
    hi guys, this time i have an easy question :)
    where can i find the movement bonuses that roads/railroads produce? for example, if i want to edit the road improvement to give +2 movement, what file(s) should i be searching for?
     
  14. God-Emperor

    God-Emperor Deity

    Joined:
    Jul 18, 2009
    Messages:
    3,551
    Location:
    Texas
    CIV4RouteInfos.xml in XML\Misc. But it can be a little tricky.

    Note that it isn't as simple as chaining a +1 to a +2. IN fact, it isn't a +anything. Roads do not give +1 they give x2 (until engineering, when they give x3).

    Every movement point a unit gets actually effectively gives it 60 movement points. Normal movement costs 60 per plot. So a road normally reduces the cost to 30, which means a speed 1 unit gets to move 60/30 = 2 when on a road. Engineering gives a -10 to the movement cost for the road (also done in that file) so that makes it cost 20: 60/(30-10) = 60/20 = 3 moves per turn on a road for a speed 1 unit after Engineering. A speed 2 unit on a road after engineering can move (2*60)/(30-10) = 120/20 = 6.

    Also, there are 2 movement costs: iMovement and iFlatMovement. The first turns out to be what is what is used on roads, the second on railroads by most units. The iFlatMovement is, in essence, used to calculate a move cost using 60 movement points for all units regardless of their actual speed (but the movement for each plot reduces the total movement points proportionately to their actual movement rate). Whichever of the 2 types works out to be faster is used.

    So, in short (too late) if you change the road's iMovement value from 30 to 20 it will triple all speeds when on a road, although the additional -10 modifier from Engineering then becomes a problem since it makes them give x6 to all movement speeds which is excessive.

    If you want to be sneaky about it you can change the road's iFlatMovement frmo 30 to 29. This will actually let speed 1 units move 3 on a road via the flat movement, but speed 2 units will still go 4 via the iFlatMovement's setting of 30. Then the -10 from Engineering will shift it to 20/19 (I think - I'm not actually certain that it applies to the flat movement rate) for regular/flat giving a speed 1 unit 4 moves via the flat rate and a speed 2 units 6 moves from the regular rate.

    Like I said, tricky.

    Also note: I have not actually tried this. But it should work.
     
  15. DarkC

    DarkC Chieftain

    Joined:
    May 8, 2012
    Messages:
    55
    thanks for the reply God-Emperor :) . few thoughts and one more question :D :
    in my mod, i was thinking to start with paths and then roads, etc.
    or, use paths with no +movement, simply to connect cities/resources, and then with construction automatically improve them to roads with the default movement bonus. can this be done, paths to automatically improved to roads when construction tech has been researched?
     
  16. platyping

    platyping Sleeping Dragon

    Joined:
    Oct 22, 2010
    Messages:
    4,626
    Location:
    Emerald Dreams
    Rather than upgrade them from paths to roads
    Isnt it simpler to just use paths with no movement boost, and then with Construction, give paths a boost, just like what engineering is doing to normal roads?
     
  17. DarkC

    DarkC Chieftain

    Joined:
    May 8, 2012
    Messages:
    55
    basically, i was hoping paths to be replaced with roads (smth like the mechanics of how hamlets improve to villages but tech dependable) so that players won't have to build the same infrastructure twice and that the name path would disappear after a certain era.
     
  18. God-Emperor

    God-Emperor Deity

    Joined:
    Jul 18, 2009
    Messages:
    3,551
    Location:
    Texas
    There is no auto upgrade for them.

    I expect you could swap them out via Python in the onTechAcquired event handler. (I'm sure platyping knows that already.)
     
  19. DarkC

    DarkC Chieftain

    Joined:
    May 8, 2012
    Messages:
    55
    if platyping could help me edit the python posting some code it would be great :) i've been doing some python editing on my own (trying to merge commands) but because i know nothing about python :)D) 99% of my efforts fail.
     
  20. platyping

    platyping Sleeping Dragon

    Joined:
    Oct 22, 2010
    Messages:
    4,626
    Location:
    Emerald Dreams
    Ah lazy God-Emperor :D
    You better at python than me.

    You are in luck, I waiting for my lunch.
    Code:
    	def onTechAcquired(self, argsList):
    		'Tech Acquired'
    		iTechType, iTeam, iPlayer, bAnnounce = argsList
    		# Note that iPlayer may be NULL (-1) and not a refer to a player object
    		
    ## Via Appia Start ##
    		if iTechType == gc.getInfoTypeForString("TECH_CONSTRUCTION"):
    			for i in xrange(CyMap().numPlots()):
    				pPlot = CyMap().plotByIndex(i)
    				iPlotOwner = pPlot.getOwner()
    				if iPlotOwner != -1:
    					if gc.getPlayer(iPlotOwner).getTeam() == iTeam:
    						if pPlot.getRouteType() == gc.getInfoTypeForString("ROUTE_PATH"):
    							pPlot.setRouteType(gc.getInfoTypeForString("ROUTE_ROAD"))
    ## Via Appia End ##
    Didn't bother to test but should work
     

Share This Page