Results 1 to 9 of 9

Thread: Please help me make "Turns till next avaliable company" to 1?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Please help me make "Turns till next avaliable company" to 1?

    With regards to : export_descr_buildings.txt

    There are many lines with "recruit_pool" for many units with 4 numbers.

    The second number is usually the one which is the waiting time for next avaliable company to be recruited.

    Can someone help me make all the waiting times to 1?

    I cant find an easy way to do it and using Excel bugs it such that it wont start.

    Help me out and thanks!

  2. #2
    Meneth's Avatar I mod, therefore I am
    Join Date
    Jul 2010
    Location
    Oslo, Norway
    Posts
    5,531

    Default Re: Please help me make "Turns till next avaliable company" to 1?

    The second number is how much it refills per turn.
    Make it 1, and the pool will refill 1 unit per turn.

  3. #3

    Default Re: Please help me make "Turns till next avaliable company" to 1?

    I know that, I was asking for either someone to do it for me
    OR a already modded file
    OR a much easier method to do it.

    I use Notepad++
    Using Excel is faster but doesnt work... sad.

  4. #4
    Meneth's Avatar I mod, therefore I am
    Join Date
    Jul 2010
    Location
    Oslo, Norway
    Posts
    5,531

    Default Re: Please help me make "Turns till next avaliable company" to 1?

    Few would be willing to do something so extensive for a single person.

  5. #5

    Default Re: Please help me make "Turns till next avaliable company" to 1?

    Why dont you just use 'control + h'.
    recruit_pool "Unit" 0 0.05 9 0 requires factions { egypt, }
    Just copy the Blue into the Find section and change the number before the decimal to 1.

  6. #6

    Default Re: Please help me make "Turns till next avaliable company" to 1?

    Quote Originally Posted by BeingOwned:)SPQR View Post
    Why dont you just use 'control + h'.
    recruit_pool "Unit" 0 0.05 9 0 requires factions { egypt, }
    Just copy the Blue into the Find section and change the number before the decimal to 1.
    Yea I just did this to check, and this def works and only took about 3 minutes.
    [IMG]file:///C:/DOCUME%7E1/b2141296/LOCALS%7E1/Temp/moz-screenshot.png[/IMG]

  7. #7

    Default Re: Please help me make "Turns till next avaliable company" to 1?

    rep for anyone willing dto do this and change recruitment numbers to 0

  8. #8

    Default Re: Please help me make "Turns till next avaliable company" to 1?

    I use a short Python script to change recruit times. Here it is:
    Code:
    import re
    from decimal import *
    
    regex = re.compile('\.[0-9]{1,6}')
    the_index = 0
    
    getcontext().prec=10
    
    new_edb = open("export_descr_buildings2.txt", 'w')
    
    for line in open("export_descr_buildings.txt"):
        m = regex.search( line )
        if m is not None:
            match = m.group(0)
            new_replacement_rate = str(float(match)*1.5)
            new_replacement_rate = "{0}".format(Decimal(new_replacement_rate))
            new_line = line.replace(match, new_replacement_rate[1:])
            new_edb.write( new_line )
        else:
            new_edb.write(line)
    It essentially replaces the current replacement rate with one that is 1.5 times faster. E.g., .025 becomes .05. To make it 1 for everyone, change new_replacement_rate to 1.0 in the format function call.

    DISCLAIMER: I do not regularly use Windows, so I'm unsure about running Python programs on Windows machines. If you're unable I could run your file. It wouldn't take but a few milliseconds to run ;-)
    Last edited by AClockworkOrange; January 01, 2011 at 08:32 AM.
    I don't always talk in tautologies, but when I do, I talk in tautologies.




  9. #9

    Default Re: Please help me make "Turns till next avaliable company" to 1?

    Hm. I was sure the NoWaiting Mod already had a version that had "1 turn units"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •