Results 1 to 11 of 11

Thread: Character Ageing and years per turn.

  1. #1

    Default Character Ageing and years per turn.

    Hi there,

    Last days I modified the descr_strat a little bit and made some other changes.

    Now I have a question:

    I edited this:
    start_date 1080 summer
    end_date 1560 winter
    timescale 0.25
    Now i want my characters to age 1/4 year per turn as well (or even less). But i can not make it on my own. I know that it is possible. In stainless steal 6.x there is an ageing script, that can be deleted to make characters age normal. Unfortunately i only have stainlesss steal 4.1...

    Actually I'm looking for the function that controlls character ageing, when the ageing script is deleted. Somehow i must implement it.. I hope you can help me!

  2. #2

    Default Re: Character Ageing and years per turn.

    There is no function or file that controls ageing...ITS ALL HARDCODED...But we do know that characters age when the game turns to the season WINTER...The way most modders implement 4, 6 or 12 turns per year with proper aging is through scripting it in the campaign_script.txt (which is located in your data/world/campaign/imperial_campaign folder) also you still have to change the timescale...I am attaching the files needed to use one of these scripts...if you need more help after you look through it just let us know....

  3. #3

    Default Re: Character Ageing and years per turn.

    Oh yeah, thank you so much =] this is exactly what i was looking for all the time. Perfect! I already tried it out. Up to know, i get a message that the game discouvered a unknown bug and must be shut down. But I think i can fix this tomorrow. Thanks again and good night

  4. #4

    Default Re: Character Ageing and years per turn.

    Hey I think I need your help one more time. I tried to put the basic script into my Stainless Steal 4.1 folder.
    As I already have a campaign_script i tried to put this script into my campaign script:

    Spoiler Alert, click show to read: 
    ;
    ; Campaign script
    ; Written by GrnEyedDvl
    ;
    ; Table of Contents
    ; 1. 6 turns per year, characters age in 1st Period
    ;
    ;
    ;
    ;
    ;
    ;
    ;

    script

    ;show the whole map
    restrict_strat_radar false

    ; 1. 12 Turns per year.
    declare_counter period
    set_counter period 1 ;set to Jan -Feb

    monitor_event FactionTurnStart FactionIsLocal ; set the season for each period
    if I_CompareCounter period == 1 ;Jan, Feb
    console_command season winter
    end_if

    if I_CompareCounter period == 2 ;March April
    console_command season summer
    end_if

    if I_CompareCounter period == 3 ;May June
    console_command season summer
    end_if

    if I_CompareCounter period == 4 ;July Aug
    console_command season summer
    end_if

    if I_CompareCounter period == 5 ;Sept Oct
    console_command season summer
    end_if

    if I_CompareCounter period == 6 ;Nov Dec
    console_command season winter
    end_if

    inc_counter period 1 ;advance the period
    if I_CompareCounter period == 7 ;start a new year
    set_counter period 1
    end_if
    end_monitor

    monitor_event FactionTurnEnd FactionType slave
    and I_CompareCounter period > 1
    console_command season summer
    end_monitor

    wait_monitors

    end_script





    Do you know, what I am doing wrong? How is this script supposed to be used? The author says:
    Spoiler Alert, click show to read: 
    Base script:
    This is the basic script, just drop it into any working M2 or Kingdoms mod folder and set the start_date and timescale in descr_strat.txt properly and it will run fine. Obviously use the Kingdoms version for Kingdoms and the M2 version for regular M2TW.


    Ok, but where to drop it? imperial_campaign? But there is already a campaign script. I'm confused =D

  5. #5
    Vegas_Bear's Avatar Biarchus
    Join Date
    Sep 2005
    Location
    Las Vegas, NV
    Posts
    605

    Default Re: Character Ageing and years per turn.

    if time scale is set to .25 this means four turns per year. The script would look like this-

    Spoiler Alert, click show to read: 
    Code:
    	declare_counter quarter
    	set_counter quarter 1 ;set to January
    
    	monitor_event FactionTurnStart FactionIsLocal ; set the season for each quarter
    		if I_CompareCounter quarter == 1 ;Jan, Feb, March
    			console_command season winter
    		end_if
    	
    		if I_CompareCounter quarter == 2 ;April, May, June
    			console_command season summer
    		end_if
    	
    		if I_CompareCounter quarter == 3 ;July, Aug, Sept
    			console_command season summer
    		end_if
    	
    		if I_CompareCounter quarter == 4 ;Oct, Nov, Dec
    			console_command season winter
    		end_if
    	
    		inc_counter quarter 1 ;advance the quarter
    		if I_CompareCounter quarter == 5 ;start a new year
    				set_counter quarter 1
    	end_if
    	end_monitor
    
    	monitor_event FactionTurnEnd FactionType slave
    		and I_CompareCounter quarter > 1
    		console_command season summer
    	end_monitor


    Place this script in the campaign_script file at the bottom and just above -
    Code:
    wait_monitors
    
    end_script
    Then you are done w/ the script. You might want to adjust the descr_settlement_mechanics.xml. You can open this file w/ notepad. The SPF stands for population, SOF stands for order, and SIF is income. You can reduce these because they are set up for vanilla, which is 1 turn = 2 years. Look in the tutorial section for more on this file.

    VB

  6. #6

    Default Re: Character Ageing and years per turn.

    Great! Thank you very much. I always placed it between wait_monitors and end_script. This is why it did not work.


    Then you are done w/ the script. You might want to adjust the descr_settlement_mechanics.xml. You can open this file w/ notepad. The SPF stands for population, SOF stands for order, and SIF is income. You can reduce these because they are set up for vanilla, which is 1 turn = 2 years. Look in the tutorial section for more on this file.
    So these factors depend on turns and not on years, so my towns will grow faster concerning ingame time?

    Ok, I'll check it out!

    One last thing:

    This is an excerpt of my descr_events. I think the events depend on turns not on years? So they will happen after e.g. 100 turns, no matter how many years have passed? So i will have to adjust this as well?

    Spoiler Alert, click show to read: 
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;; EVENT LIST ;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    event historic bologna_university
    date 8

    event historic council_of_clermont
    date 16

    event historic worms_concordat
    date 42

    event historic council_of_troyes
    date 48

    event historic first_windmill
    date 50

    event historic omne_datum_optimum
    date 54

    event historic earthquake_in_aleppo
    date 58
    position 319, 90

    event historic science_alchemy_book
    date 64

    event historic first_european_paper
    date 72

    event historic the_book_of_sentences
    date 76

    event historic hanseatic_league
    date 80

    event historic first_rudder
    date 100

    event historic first_magnetic_compass
    date 102

    event historic battle_hattin
    date 108

    event historic teutonic_order
    date 110

    event historic first_wheelbarrow
    date 120

    event historic science_maths_zero_europe
    date 122

    event historic franciscan_order_founded
    date 130

    event historic magna_carta
    date 132

    event historic dominican_order_founded
    date 134

    ; ------------ CORE GAME EVENT --------------
    event historic mongols_invasion_warn
    date 134 140

    ; ------------ CORE GAME EVENT --------------
    event historic inquisition
    date 154

    event historic gunpowder_discovered
    date 160 170
    movie event/gunpowder_invented.bik

    event historic dante_born
    date 185

    event earthquake earthquake_in_silicia
    date 188
    position 287, 94

    event historic summa_theologica
    date 194

    event historic first_mechanical_clock
    date 200

    event historic first_eyeglasses
    date 206

    event historic new_era_begins
    date 220

    event earthquake earthquake_in_alexandria
    date 222
    position 285, 47

    event earthquake earthquake_in_alexandria_2
    date 232
    position 285, 47

    event historic football_banned
    date 234

    event historic first_sawmill
    date 248

    event historic first_public_clock
    date 254

    event historic science_weather_forecast
    date 256

    event historic hundred_years_war
    date 258

  7. #7

    Default Re: Character Ageing and years per turn.

    Just to clarify what vegas_bear said so as to avoid confusion...Copy and paste from the turns per years script into your existing script where he said....Also Make sure your time scale is set right for the 6 turns per year script...This is what it should be...
    Code:
    6 Turns per Year
    start_date has to be winter
    timescale has to be 0.167
    EDIT; sorry i was too slow anyway to answer your other question...Yes...Simple method is to multiply all numbers by 12 and round up to nearest whole number if necessary...since vanilla is 1turn = 2yrs. and your script has 6 turns per year then that means it takes you 12 turns to equal 1 of vanilla...this should put your events back on track...if SS4.1 was already running two turns per years then multiply everything by 3...

    Also check you should check your campaign script for scripts that run on turn numbers and adjust those as well...just open it and hit ctr+f and in the seach bar type I_TurnNumber and hit the find button...it'll take you right to them...
    Last edited by valvegas1; March 29, 2012 at 02:40 PM.

  8. #8

    Default Re: Character Ageing and years per turn.

    That was my fault. I forgot to tell you, that I switched from 4 to 6 turns per year. My timescale was correct, but I had the script on the wrong spot.

    Ok, I'll do so. Now everything is finished and i can start to try it out. Thank you guys!

  9. #9

    Default Re: Character Ageing and years per turn.

    Glad to be of assistance...

  10. #10
    Vegas_Bear's Avatar Biarchus
    Join Date
    Sep 2005
    Location
    Las Vegas, NV
    Posts
    605

    Default Re: Character Ageing and years per turn.

    Sorry a little late, but glad you got it figured out. You will also need to change the dates in the export_descr_ancillaries.txt to match your timescale for the heroes/ famous characters.

    VB

  11. #11
    JRP's Avatar Laetus
    Join Date
    Oct 2010
    Location
    Victoria British Columbia Canada
    Posts
    13

    Default Re: Character Ageing and years per turn.

    Not to burst anyones bubble.. But the only thing I see wrong with this is that your general's wives can have 2 children less than 8 months apart.. lol

Posting Permissions

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