Results 1 to 8 of 8

Thread: Little help? Trying to change faction religion

  1. #1

    Default Little help? Trying to change faction religion

    Hey guys, im trying to change ERE religion to pagan, but i dont know what im missing. So far I hv followed these tutorials:

    http://www.twcenter.net/forums/showt...ion-and-Church

    https://www.twcenter.net/forums/show...hange-religion

    http://www.twcenter.net/forums/showt...nvert-to-pagan

    https://www.twcenter.net/forums/show...ark-and-Norway

    I hv followed every step but I still got CTD. Can anyone give me a hand?

    Thanks in advance

  2. #2
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,132
    Blog Entries
    35

    Default Re: Little help? Trying to change faction religion

    As I said on Steam: lots of stuff that can go wrong.

    The first guide is the one you need to follow - the rest is about changing religion via script which will still need all the EDB stuff.

    1. Always make backup of the files you are editing
    2. Only use Notepad or it's ++ version to edit text files
    3. Make sure the log entry in the mod's CFG file (also opens with Notepad) is set to trace, not error.
    4. Provide a compressed trace log (7Zip is freeware)










  3. #3

    Default Re: Little help? Trying to change faction religion

    So, I set my CFG to trace but the system.log doesnt update. I did all the steps again and found some errors but I still CTD.

    I believe my main issue is with EDB (instant crash), when I reload my original EDB the game starts, even with all the others scripts set with the pagan code, but the campaing doesnt start (thats something i want to figure later, first things first, rigth?)

    I have tryied 2 ways with EDB:

    my first try, and original ideia, was add a olympian/pagan religion to ERE. I pasted the entire orthodox block at the bottom of the pagan block and deleted the other faction entries. Later i deleted all events related in this block of code. On my second try I added byzantium in the dievas temple block. In both cases i still CTD.

    Ill attach the files, just in case someone want to have a look
    Attached Files Attached Files

  4. #4
    Jurand of Cracow's Avatar History and gameplay!
    Join Date
    Oct 2012
    Location
    Cracovia
    Posts
    8,494

    Default Re: Little help? Trying to change faction religion

    I personally think that making this change is very, very laborious. Religion is everywhere for any faction, and for the ERE the most. Out of my head I can think of many traits (EDCT) and ancillaries (EDA) that are defined by religion, many buildings (you might have seen them, but byzantium is not the only code used for byzantium, see below), and a plethora of scripts, in the places you wouldn't even expect. Perhaps also many aspects of diplomacy, maybe even of the AI. I'm not sure it can be done unless you're ready to spend hundred of hours of delving into every aspect of it. And you need to know scripting mechamism very well and the content of the SSHIP script.txt intimately. The current shape of the script.txt is my creation starting with the SSHIP092 as a base, with quality check and efficiency improvements by Belovese (it was 45k code lines, after two years of our work it's 65k). I've added explanations in many parts, but getting it to know is still a learning-by-coding affair.

    Byzantium is defined, inter alia, here in the script and the counters are used in many other files:
    Code:
        ; --- byzantium ---    monitor_event PreFactionTurnStart FactionType byzantium
            log always Turn Start byzantium    ==============================================================
            set_event_counter faction_turn_byzantium 1
            set_event_counter faction_turn_orthodox 1
            set_event_counter faction_turn_greek 1
            
            if I_IsFactionAIControlled byzantium
                set_counter ai_ec_id 17
            end_if
    
    
            if not I_IsFactionAIControlled byzantium
                set_counter pl_ec_id 17
            end_if
        end_monitor
    Code:
    ;======================================================================================================;======================================================================================================
    ;---- HELP FOR MODERS
    ;======================================================================================================
    ;======================================================================================================
    
    
    ; always add a "wait 1.0" command between: a conquest of a settlement <> destroying building(s)
    
    
    ;------------------------------------------------------------------------------------------------------
    ;-------  Technical advice   --------------------------------------------------------------------------
    ;------------------------------------------------------------------------------------------------------
    
    
    ;------- Don't make the changes unless you had analysed all potential side-effects of your script  ----
    ;
    ; There're many ingenious scripts coded in the other mods, but they are very likely to interact with scripts already included in the mod.
    ; Or the may just get into collision with the overall gameplay, producing very UNexpected results, from strange behaviour to crashes.
    ; This concerns also the EDCT (traits), the EDA (anciallaries), the EDB (buildings), the DM (mercenaries): many mechanisms there are defined here in the script.
    ; So: DO NOT DELETE anything unless you're 200% sure it will not have any unforeseen side-effects.
    
    
    ;------- Optimisation of processing time:
    ; The goal is to shorten the processing time between the turns, so:
    ; - the conditions that have the least likelyhood should be put at the beginning of a list of conditions in a monitor (because the engine will then just skip the rest of the conditions).
    ; - each monitors should be terminated as soon as it is possible. Add terminate to any monitor, just in case something strange happens.
    
    
    ;------- Comfort of the players:
    ; - limit the frequency of historical_events notifications by limiting them to the relevant factions or only to the player.
    
    
    ;------- Saveguards against crashes:
    ; - always add a randomness to a monitor (eg RandomPercent > 90) so that it would be possible to move from a save even if that monitor would cause a crash
    ; - use < > rather than =
    
    
    ;------- COUNTERS
    ; You do not need to declare an event_counter - it always exists in a zero state.
    ; You do need to declare a normal counter.
    ; historic_event 
    ; - creates a regular event_counter (if one doesn't already exist) and increments its value by +1.
    ; - obviously, it also displays a scroll (formatted by an entry in descr_event_images.txt with text from historic_events.txt).
    ; - you can interact with this event_counter using set_event_counter, inc_event_counter, or conditions like I_EventCounter.
    
    
    ; Negation of a normal counter can be done in two ways:
    ; and not I_CompareCounter ai_ec_id = 21
    ; and I_CompareCounter ai_ec_id ! = 21
    
    
    ; (perhaps not true but it was noted before): counter that changes throughout the game (eg. during player's turn is 1, but during AI is 0) should rather be not be used as condition for buildings (in EDB) because it breaks the building queue. 
    
    
    ;------- CONDITIONS IN MONITORS and in IF CLAUSES
    
    
    ; 'If' sections only work correctly with conditions that start with I_, like I_SettlementUnderSiege (basically conditions that do not need trigger requirements, eg do not depend on the export of the event).
    ; In case you want to script that something happens in a Scotland turn:        monitor_event FactionTurnStart FactionType scotland
    ; but if you cannot use the monitor, use the clause:                        if I_EventCounter faction_turn_scotland = 1
    
    
    ; Conditions that CANNOT be used in IF-clauses:
    ; --- "Treasury = X" (needs the faction exports)
    ; --- "FactionBuildingExists" (needs the faction exports) - but you can use I_SettlementOwner
    ; --- "SettlementBuildingFinished" (needs building exports)
    
    
    ; Special issues:
    ; - IsJihad - checks if a jihad is in progress
    ; - IsOnJihad - checks if the character has signed up for the jihad
    
    
    
    
    ;------------------------------------------------------------------------------------------------------
    ;-------  Defining who's turn: player, AI, faction   --------------------------------------------------
    
    
    ; At the beginning of each faction turn start the following is defined:
    ;   is_the_ai 0            = PLAYER (used in the "Unrest Surges in Certain Major Cities" script)
    ;   is_the_ai 1,2,3,4    = AI: depends on difficulty (used in the "Unrest Surges in Certain Major Cities" script, used in EDB to provide AI with bonuses depending on the difficulty level)
    
    
    ;   is_the_player 1        = PLAYER TURN (used in the EDB for unit recruitment and for few building benefits)
    ;   is_the_player 0        = AI TURN (used neither in the EDB nor in 097 script)
    
    
    ;   ai_ec_id :            = WHICH FACTION IS CURRENTLY PLAYING: 0=Local player, 1=rebels, 2=venice etc (used in Faction Economy script)
    ;   pl_ec_id :             = WHICH FACTION THE PLAYER IS: 2 = venice etc (used in Rebellion script)
    ;
    ;     1 slave, 2 venice, 3 sicily, 4 abbasid, 5 papal_states, 6 denmark, 7 egypt, 8 scotland, 9 cumans, 10 mongols, 11 turks,
    ;     12 france, 13 hre, 14 england, 15 portugal, 16 poland, 17 byzantium, 18 moors, 19 russia, 20 spain, 21 hungary, 22 aragon,
    ;     23 lithuania, 24 kievan_rus, 25 serbia, 26 georgia, 27 norway, 28 jerusalem, 29 zengid, 30 pisa, 31 rum
    
    
    
    
    ; The best way to script things dependent on the player and factions:
    ;
    ; monitor_event whatever
    ;   if I_EventCounter is_the_player = 1                  ; player turn
    ;   and I_EventCounter faction_turn_england = 1            ; England turn
    ;    and I_EventCounter DifficultyLevel > 2                ; Hard or Very Hard difficulty
    ;          do stuff
    ; end_monitor
    
    
    ; monitor_event whatever
    ;   if I_EventCounter is_the_player = 0                  ; AI turn
    ;   and I_EventCounter faction_turn_england = 0            ; not England turn
    ;    and I_IsFactionAIControlled france                    ; player is not France
    ;    and I_EventCounter DifficultyLevel = 4                ; Very Hard difficulty
    ;          do stuff
    ; end_monitor
    
    
    ; Defining time:
    ;     and I_TurnNumber > 10
    ; But one may define years of the mod and:
    ;    and I_CompareCounter campaign_year > 1110
    ; (it is the way in Titanium)
        
    ;------------------------------------------------------------------------------------------------------
    ;-------  Useful counters already defined   --------------------------------------------------
    
    
    ; AGGRESSOR: to be analysed how do the links to EDCT work with
    ; aggressor 1 - faction is currently engaged in a war it has started.
    ; aggaragon 1 - it is Aragon that is the aggressor
    
    
    ;    monitor_event CharacterTurnStart Trait Aggressor_Aragon > 0
    ;        set_event_counter aggressor 1
    ;    end_monitor
    
    
    ;    monitor_event FactionWarDeclared TargetFactionType aragon
    ;        set_event_counter aggaragon 1
    ;    end_monitor
    
    
    ; OCCUPATION of a city
    ; paris_occupied 1 (normal state: 0; similar counters for 30 other cities) - this turn somebody has conquered Paris (resets after the end of the turn)
    
    
    ; SIZE OF the players' TREASURY:
    ; player_treasury - see script ;------- Player's treasury size counter (to be used in other scripts!)
    Last edited by Jurand of Cracow; January 29, 2022 at 11:54 AM.

  5. #5

    Default Re: Little help? Trying to change faction religion

    Aaaaaw too bad, I definetly dont want to spend so much time over this. i just thouthg it would be fun. Thanks for the reply guys, ill play with lith next than.

  6. #6
    Jurand of Cracow's Avatar History and gameplay!
    Join Date
    Oct 2012
    Location
    Cracovia
    Posts
    8,494

    Default Re: Little help? Trying to change faction religion

    Well, it's better to start from something smaller. My start was from capabitilites of a temple for the EBI mod. For the SSHIP, it was the eductional system. So maybe you'd fancy making something like this?
    As said, in the SSHIP files there's a lot of advice for modding, eg. in EDCT:
    Code:
    ;==========================================================================================================================;          INFORMATION on MODDING THIS FILE
    
    
    ;-----------------------------------------------------------------------------------------------------
    ;  WHAT SHOULD BE DONE:
    ;  - merging traits TooOldToFight with Senile (the first is redundant)
    ;  - initial 
    
    
    ;-----------------------------------------------------------------------------------------------------
    ;- many people contributed, and there're various mechanism in the file; some coding problems were not known at the time of their creation (see below)
    ;- some traits may be used as "instruments" in the script or EDA - don't delete anything unless you're 100% sure they are not used
    ;- there's already a lot of traits visible for the player so it's better to fuse some of them (and not add more)
    ;- a general rule: the fewer effects a trait has, the better (it's easy to grasp for the player)
    ;- in the triggers, for safety reasons it's better to use > than = (eg.: > 95 is better than = 100, or [ >4 <6 ] than [=5])
    ;- it seems that the probability 1% (Chance 1) is bugged - it's better to use RandomPercent > 80 and Chance 5
    ;- for optimalisation of processing time, use the rarest condition as the first condition in a trigger (eg. "RandomPercent > 80" will skip reading the rest of the conditions in 80% of cases)
    ;- if a criterium is not possible (eg. SettlementBuildingExists outside of settlement) it's always TRUE. This may ruin your triger.
    ;- "PostBattle" fires also after autoresolved battles. There's no simple way to ensure the player fought the battle manually.
    ;- the AI gets special traits and special triggers for some traits - pay attention to it.
    
    
    ;---------- NEW GENERALS --------------------------------------------------------------
    ;- Coming of Age does NOT take place in a settlement => therefore condition "SettlementBuildingExists" will not work
    ;- for a general recruited from a building (as a unit) the OfferedForAdoption triggers fire
    ;- Adoption is into family tree => FatherTrait will work as condition (in most cases it makes little sense but might be useful in certain situations)
    ;- for scripted and starting generals there must be special triggers at CharacterTurnStart
    
    
    ;---------- ANTITRAIT + NOGOINGBACK bug --------------------------------------------------------------
    ; in vanilla M2TW and in Stainless Steel the main trait-relatged bug is the AntiTrait plus NoGoingBack; also any AntiTrait is prone to be bugged.
    ; In the SSHIP the end-goal is to get rid of all Antitraits and all NoGoingBack. The ways of dealing with it:
    ; 1. pairs of traits that are given to every general -> fusion of both traits into one, introduction of the initial value, and triggers only for that one
    ; 2. for rarer traits being clear Antitraits it's bad method because it will clogg the generals' panel with too many traits, so
    ;    leave triggers as they're but at the end introduce a ClearingHouse: taking away a point for both so that at the end only one has a positive value 
    ; 3. more Antitratis - as above but with more complicated triggers
    ; 4. NoGoingBack - creation of large threshold making it in practice NGB (eg. trait has 1,2,3, and NGB should be at 3rd level, then it has 1,2,13)
    ;               be aware that crashes were reported if using this method so pay attention that the higher value of threshold should go first and the first threshold should not have "Gain" or "Epithet"
    ;
    ;---------- DIFFICULTY LEVELS  ----------------------------------------------------------------
    ;
    ;-- you may differentiate difficulties (2 - normal, 3 - hard, 4 - very hard) with "and I_EventCounter DifficultyLevel = 3" (use = but not < > as, for unknown reason, the latter sometimes don't work)
    ;-- be very careful and check if your changes doesn't disable the script (this happens but is easy to spot once you run the game - a red ERROR in the left bottom corner)
    ;
    ;-- if the character is at sea, he is by default abroad - if you don't want such a situation, add the condition "not InEnemyLands"
    ;-- if you're using condition "PopulationOwnReligion <", you should also use "not AtSea" (otherwise there's an error reported in log)
    ;
    ;---------- USEFUL FAMILY TRAITS ----------------------------------------------------------------------
    ;  MarriageCertificate  - is married 
    ;  HaveChilds - have children
    ;  BiologicalSon, BastardSon, Adopted, MarriedIntoFamily - each general has such a status (bastard means: born to another mother)
    ;
    ; Important: Republics no longer transmit Factionleader 1 by blood, instead those with royal blood gain it by having good traits and lose it by having bad ones (simulate acceptability to the electors).
    ; this aspect should be reviewed in the light of compatibility of the triggers
    ;
    ;---------- USEFUL SSHIP CAMPAIGN TRAITS ---------------------------------------------------------------------
    ;  ArmyIsCamping - last turn eneded outside of settlement, having not moved last turn, may be differentiated <>50% religion
    ;  CounterOfBattles (and 2 other traits for higher numbers) - shows if a general was in battles and how much experience does he have
    ;  GovernorExperience - shows if the general has a governor experience (and how long: in 10s of years)
    ;
    ;---------- USEFUL HEALTH & PSYCHOLOGY TRAITS ---------------------------------------------------------
    ;
    ;  FIT_FOR_OFFICE depicts physical and psychical health - you may use it as proxy of the minimum for overall health. It comprises:
    ;  Intelligent > 3, Insane < 2, Paranoia < 4, Slothful < 3, AbsentMinded < 1, AbsentMindedGeneral < 1, Senile < 2, Diseased < 1, HaleAndHearty > 2
    ;  note that: TooOldToFight doesn't disqualify from office!
    ;
    ; PRO MEMORIA:
    ;- Senile - is condition to get many traits - at some point one may rather replace it with "FitForOffice" trait that embraces the broader notion of overall health
    ;
    ; FOR FURTHER MODDING:
    ; triggers based on "Building completed", "Visiting settlement with", "Sitting in the settlement with" 
    ; can be moved to the relevant triggers section: they'll contain additional conditions, therefore one cannot economize on the number of triggers
    ; bribe resistance (1 = 10%) should be reviewed
    
    
    ;---------- POST-BATTLE TRAITS ---------------------------------------------------------
    ;
    ; (1) Triggers fire only for the commanding general, not for all generals fighting in the battle.
    ;
    ; (2) It is not possible to guarantee by code that the effects of the battle would be acquired only if the player fought the battle personally (they fire also when autoresolving).
    ; However, at least on the higher difficulties the autoresolve mechanism is calibrated in such a way that you'd lose a battle if you'd autoresolve and the odds are not much into your favour. 
    ; As a result, if you want to ensure that the triggers would fire only if the player personally played a battle, it's enough to put conditions that a battle is fought against the low odds (eg. BattleOdds < 0.9) and the results are good (BattleSuccess >= clear).
    ;
    ; (3) The other side of the coin is that you should put a cap on the triggers for "bad traits", eg.:      and BattleOdds <= 3
    ; If there's no such cap, then they will fire on any autoresolving and provide those bad traits very often.
    ; Therefore always put a cap for PostBattle triggers.
    
    
    ; (4) Some conditions do not actually work.
    ; However, some do work: NumEnemiesInBattle,
    
    
    ;----------------------------------------------------------------------------------------------------------------------------------
    ;
    ;- AGENTS:
    ;
    ;----- Gameplay:
    ;- the use of the agents should be "natural" for any M2TW player - there're no special rules or tricks; the mechanism are from the Stainless Steel 6.4. with addition of the health and age issues (it was highly un-historical that the eldest agents were the fastest and all-round the best).
    ;- to make the player confident some hints will appear during a few first turns (in the form of the historical events) - the player may or may not pay attention, he may just behave instinctively and rationally, and everything should be go smoothly. There's no need for any external manual.
    ;
    ;----- Difficulty levels:
    ;- bonuses for the difficulty levels have been introduced for all agents.
    ;- since the player is likely to have better agents as the game progresses (eg. he'll have the guilds giving skills etc.)
    ;- the bonuses/maluses are progressively more and more disadventagous for the player;
    ;- at Easy/Normal there're buffs for the player (or de-buffs for non-playable agents), they stop after 200 turns
    ;- at Hard the AI agents get some bonuses right from the beginning
    ;- at VeryHard the AI agents get also additional bonuses after 100 turns, and another after 300 turns (so that they're tripled)
    ;
    ;----- Triggers:
    ;- all player's agents may benefit from visiting settlements with certain buildings, their actions and various events;
    ;- for a few agents (spy, assassins, diplomats, priests, princesses) there're benefits from visiting certain regions;
    ;- all agents have triggers to fall ill what results in lower movement range and lack of ability get more skills; they recover naturally;
    ;- all agents have triggers for losing natural skills as they age;
    ;- the triggers for external events (like volcano eruptions, raiding etc.) have not been introduced (yet);
    ;- the AI gets special triggers to compensate that they don't know many rules the player knows (eg. visiting cities with buildings);
    ;- there're separate triggers for the AI agents spawned by script (since they don't get those given at creation)
    ;
    ;----------------------------------------------------------------------------------------------------------------------------------

  7. #7

    Default Re: Little help? Trying to change faction religion

    Thanks Jurand and good job by the way, this mod is my favorite. Ill keep small for now, maybe someday I can do something like SSHIP

  8. #8
    Jurand of Cracow's Avatar History and gameplay!
    Join Date
    Oct 2012
    Location
    Cracovia
    Posts
    8,494

    Default Re: Little help? Trying to change faction religion

    Quote Originally Posted by vitoralb View Post
    Thanks Jurand and good job by the way, this mod is my favorite. Ill keep small for now, maybe someday I can do something like SSHIP
    If you want to start modding, the best is with the ancillaries. Coding is the most straightforward, and you can instantly see your results. There's some work in the SSHIP in this department as well. For the Byzantines, we need to sort out the offices that were important at some point in the past but then not reviewed. In the EDA there're some advices as well:
    Code:
    ;SSMAP EDA edited by Ravenant: May-2012;SSHIP edited by MagicCuboid January-2013 (added Skadar ancillaries)
    ;SSHIP v0.9.6 edited by Jurand of Cracow Summer-2018, VineFynn July-2019
    ;SSHIP v0.9.7 edited by Jurand of Cracow 2020
    
    
    ;---------------------------------------------------------------------
    ; General assumptions for modding ancillaries:
    ; - make as many as possible transferable - swapping between generals is a part of the game for the player.
    ; - they should have 2 major benefits net (eg. 3 positive and 1 negative) for the player to bother to pay attention.
    ; - negative ancillaries are not transferable. They should also come very rarely.
    ;
    ;---------------------------------------------------------------------
    ; Advice for coding:
    ;--- put the strictest conditions (ie. true very rarely) at the beginning of each trigger to save processing time.
    ;--- in the triggers it's better to use > than = (eg.: > 95 is better than = 100, or [ >4 <6 ] instead of [=5]).
    ;--- don't use (Chance 1) - use RandomPercent > 80 and Chance 5 or similar
    ;--- be aware that you cannot change this order:
    ;------  ExcludedAncillaries XYZ
    ;------  ExcludeCultures XYZ 
    ;---- (also: you can exlude only up to 3 ancillaries in this way)
    ;
    ;---------------------------------------------------------------------
    ; Plans for further modding: cleaning, checking and modifications planned:
    ;--- generic ancillaries review, including grouping them into classes.
    ;--- byzantine offices and relics - to be reviewed
    
    
    ;---------------------------------------------------------------------
    ; Ideas other ancilleries:
    ;--- Herolds - +Authority, only Catholic, maybe only with blood, after a historic event: reflect cultural developments and creation of such posts
    ;- make Muslim version of the Defender of the Crown - al-Nasir li-Din Allah (ar-Rahman III got it)
    ; - Saxo Grammaticus (only for Danes, once a cathedral of Lund is built, historically early 13c.)
    
    
    ; TO DO 
    ; check if it works in this file and add to numerour ancillaries
    ;        and CharacterAge > 50
    ; so that the player cannot devote an old general as a "digger for good ancilalries"

Posting Permissions

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