Quick Modding Questions Thread

Several possibilities:
- You should find something like "always at war" option when you launch a custom game. This makes every AI at war with human player.
- You can set all civs as a minor civ
- The_J has also made a python mod that makes every player at war with every player (human or AI):
 
Several possibilities:
- You should find something like "always at war" option when you launch a custom game. This makes every AI at war with human player.
- You can set all civs as a minor civ
- The_J has also made a python mod that makes every player at war with every player (human or AI):
Thank, only I am doing a typical WW2 scenario and I need individual countries not to be able to make peace
 
Help us to help you:

- Which core do you use for your mod? BTS 3.19? RTW? AdvCiv? C2C? FFH2? The underlying question is "are you sure your AI is basically able to understand that planes exist and understands how to use it?". If you use Topsecret's Middle-Earth dll for example, I'm not sure AI does even basically know what planes are made for...

- Does AI build planes but doesn't use it? Or does AI not build planes at all?

- What are the requirements for your planes? Techs? Buildings? Ressources? The both? If so, does AI have access/understand what is required?
For instance, if you use an "aircraft factory" requiring "industry III" tech, with aluminium and/or iron as ressources to build an aircraft that requires "flying II tech", with oil and ammo as ressources (etc...), does AI knows that? Does AI have access to all [AND/OR] techs and to all [AND/OR] ressources needed?

- Is your planes iAssets high enough compared to other units? Isn't there a significant distortion between units on this parameter?

- Is there possibly a (non) random event that could interfer?

You have to check many parameters to answer your question...
 
- Which core do you use for your mod? BTS 3.19? RTW? AdvCiv? C2C? FFH2? The underlying question is "are you sure your AI is basically able to understand that planes exist and understands how to use it?". If you use Topsecret's Middle-Earth dll for example, I'm not sure AI does even basically know what planes are made for...
This problem is in this mod:
 
I understood.
But it doesn't tell me where it comes from and then where to search. Is it a dll you compiled by yourself, or do you use someone else work?
I mean I'm not sure someone will have time/patience to scan all your C++, Python and XML codes. I tried to have a look at the readme available in your GitHub, but failed (I'm not familiar with GitHub at all). Can you tell us a bit more?
 
I don't remember the source, I remember that I downloaded it from this forum (this dll may have 18 civilizations)
when it comes to the plane
 

Attachments

  • 1702835399067.png
    1702835399067.png
    179.8 KB · Views: 12
  • 1702835442376.png
    1702835442376.png
    140.5 KB · Views: 13
  • 1702835463814.png
    1702835463814.png
    156.7 KB · Views: 12
  • 1702835484753.png
    1702835484753.png
    115.1 KB · Views: 12
Hello, I was curious how to rig and animate a model for a Civ 4 mod since a lot of the older posts have broken links and/or outdated information.
 
you are using vanilla bts.
i dont know how it works, but probably very week and outdated.

the setting for your bomber seems fine.
the domain sea 8 im not sure if thats good.
also - check the combat =0, im not sure in vanilla bts air units its set to 0. i think ai calculates based on that.

i recommend use kmod if you wanna see proper AI.
 
Does anyone have advice how to measure time elapsed in the game? I have been using this:
Python:
class Timer(object):

    def __init__(self):
        self.start = datetime.now()
    
    def elapsed(self):
        return datetime.now() - self.start


@handler("GameStart")
def startTimer():
    global TIMER
    TIMER = Timer()
    

@handler("birth")
def stopTimer(iPlayer):
    message = """AUTOPLAY TIME UNTIL %s: %s
    """
    print message % (name(iPlayer).upper(), TIMER.elapsed())
But for whatever reason this seems to have a precision of 2m8s:
Code:
[81203.563] AUTOPLAY TIME UNTIL ASSYRIA: 0:00:00
    
[81208.875] AUTOPLAY TIME UNTIL CHINA: 0:02:08
    
[81213.313] AUTOPLAY TIME UNTIL HITTITES: 0:02:08
    
[81217.656] AUTOPLAY TIME UNTIL GREECE: 0:02:08
    
[81220.859] AUTOPLAY TIME UNTIL INDIA: 0:02:08
    
[81232.484] AUTOPLAY TIME UNTIL PHOENICIA: 0:02:08
    
[81240.609] AUTOPLAY TIME UNTIL NUBIA: 0:02:08
    
[81252.313] AUTOPLAY TIME UNTIL PERSIA: 0:02:08
    
[81266.219] AUTOPLAY TIME UNTIL CELTS: 0:02:08
    
[81275.625] AUTOPLAY TIME UNTIL ROME: 0:02:08
    
[81285.672] AUTOPLAY TIME UNTIL MAYA: 0:02:08
    
[81306.656] AUTOPLAY TIME UNTIL DRAVIDIA: 0:02:08
    
[81309.281] AUTOPLAY TIME UNTIL ETHIOPIA: 0:02:08
    
[81326.203] AUTOPLAY TIME UNTIL TOLTECS: 0:02:08
    
[81355.500] AUTOPLAY TIME UNTIL KUSHANS: 0:04:16
    
[81403.906] AUTOPLAY TIME UNTIL KOREA: 0:04:16
    
[81443.141] AUTOPLAY TIME UNTIL KHMER: 0:04:16
    
[81527.922] AUTOPLAY TIME UNTIL MALI: 0:06:24
    
[81541.922] AUTOPLAY TIME UNTIL BYZANTIUM: 0:06:24
    
[81615.391] AUTOPLAY TIME UNTIL FRANCE: 0:08:32
    
[81616.125] AUTOPLAY TIME UNTIL MALAYA: 0:08:32
    
[81624.641] AUTOPLAY TIME UNTIL JAPAN: 0:08:32
    
[81635.766] AUTOPLAY TIME UNTIL VIKINGS: 0:08:32
    
[81636.625] AUTOPLAY TIME UNTIL TURKESTAN: 0:08:32
    
[81666.375] AUTOPLAY TIME UNTIL ARABIA: 0:08:32
    
[81673.938] AUTOPLAY TIME UNTIL TIBET: 0:08:32
    
[81717.891] AUTOPLAY TIME UNTIL MOORS: 0:10:40
    
[81725.359] AUTOPLAY TIME UNTIL JAVA: 0:10:40
    
[81726.641] AUTOPLAY TIME UNTIL SPAIN: 0:10:40
    
[81775.078] AUTOPLAY TIME UNTIL ENGLAND: 0:10:40
    
[81787.750] AUTOPLAY TIME UNTIL HOLY ROME: 0:10:40
    
[81797.688] AUTOPLAY TIME UNTIL BURMA: 0:10:40
    
[81818.063] AUTOPLAY TIME UNTIL RUTHENIA: 0:10:40
    
[81850.531] AUTOPLAY TIME UNTIL VIETNAM: 0:12:48
    
[81861.141] AUTOPLAY TIME UNTIL SWAHILI: 0:12:48
    
[81893.469] AUTOPLAY TIME UNTIL POLAND: 0:12:48
    
[81966.406] AUTOPLAY TIME UNTIL PORTUGAL: 0:12:48
    
[81985.516] AUTOPLAY TIME UNTIL INCA: 0:14:56
    
[82008.859] AUTOPLAY TIME UNTIL ITALY: 0:14:56
    
[82028.938] AUTOPLAY TIME UNTIL MONGOLIA: 0:14:56
    
[82029.422] AUTOPLAY TIME UNTIL AZTECS: 0:14:56
    
[82066.281] AUTOPLAY TIME UNTIL MUGHALS: 0:14:56
    
[82102.938] AUTOPLAY TIME UNTIL SWEDEN: 0:17:04
    
[82121.391] AUTOPLAY TIME UNTIL RUSSIA: 0:17:04
    
[82230.203] AUTOPLAY TIME UNTIL CONGO: 0:19:12
    
[82441.719] AUTOPLAY TIME UNTIL IRAN: 0:21:20
    
[82643.219] AUTOPLAY TIME UNTIL NETHERLANDS: 0:25:36
    
[83241.625] AUTOPLAY TIME UNTIL GERMANY: 0:34:08
    
[83759.141] AUTOPLAY TIME UNTIL AMERICA: 0:42:40
    
[84123.125] AUTOPLAY TIME UNTIL ARGENTINA: 0:49:04
    
[84281.359] AUTOPLAY TIME UNTIL MEXICO: 0:53:20
    
[84439.594] AUTOPLAY TIME UNTIL COLOMBIA: 0:55:28
    
[88961.875] AUTOPLAY TIME UNTIL CANADA: 2:10:08
Obviously these times are not accurate but for whatever reason they end up being rounded to multiples of 2m8s. Can anyone spot if I am doing something wrong? Is there a better way to measure/access elapsed time in the game?
 
I did the below for Beyond the Game at a friends' request : A counter of time played for each player for each turn etc., how many times you did enter etc.
My (other) friend then easily ported this for FFH, eventhough there is quite bit of C++ involved to develop all the players and turn metrics (just stat counting). [I would of course happily share it with you, it's all public in BTG anyway]

Long story short -- This is all based on the turnSlice funtions
Code:
int CvGame::getMinutesPlayed() const
{
    return (getTurnSlice() / gDLL->getTurnsPerMinute());
}

There are 4 turn slices in a GAME second as you probably know,
Which is different from "real life time"


A sample of an online game where I reloaded to show you the speed of player stats (this was classical start so started turn 33).
1703510885563.png



I think this is all obvious for somone like you but can you use game time for what you want to do ?
 
Yeah you are right! I did not consider using turn slices as the game clock at all. Thanks!
 
Back
Top Bottom