• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

tsf4

General
58 Badges
May 31, 2012
2.388
796
32
  • Crusader Kings II: Charlemagne
  • Europa Universalis IV: Mare Nostrum
  • Victoria 2: A House Divided
  • Sengoku
  • Semper Fi
  • Europa Universalis IV: Res Publica
  • Heir to the Throne
  • Hearts of Iron III: Their Finest Hour
  • Hearts of Iron III
  • For the Motherland
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Divine Wind
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Europa Universalis IV: Mandate of Heaven
  • PDXCon 2017 Awards Winner
  • Hearts of Iron IV: Death or Dishonor
  • Age of Wonders III
  • Europa Universalis IV: Cradle of Civilization
  • Hearts of Iron IV: Expansion Pass
  • Crusader Kings III
  • Europa Universalis IV: Rule Britannia
  • Europa Universalis IV: Dharma
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Golden Century
  • Imperator: Rome
  • Imperator: Rome Sign Up
  • Age of Wonders: Planetfall
  • Age of Wonders: Planetfall - Revelations
  • Imperator: Rome - Magna Graecia
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV
  • Victoria 2
  • 500k Club
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Conclave
How do I duplicate everything needed for the second offmap?

For instance, can the game load effects and triggers and cbs which have the same name but different contents?
 
Yes. So, the mod's first offmap is a China comparison, which was easy to do. Swap everything in the game on China and make it for the new offmap's name.

But the second offmap is a type of offmap caliphate, and we want to use the same code and structure for the China comparison. But, lots of the code only is made to reference a single offmap, so how do I go about duplicating this and making it all work? especially for code which does not have china in the name?

In short, I want another offmap using the same cbs, effects, events, etc as China but don;t know how to get there.
 
to start with, you can can just clone the common\offmap_powers folder from vanilla.
then copy or rename the 00_offmap_powers.txt file. Change the first tag "offmap_china" into "caliphate" or something.
IIRC it will automaticaly adds a new offmap button and cloning everything.
Then you can start changing the code in the same file still, defining a diffrerent graphical window, attaching a title, changing the currency, changing the button etc.
Mind that when you start changing GUI things, you'll need to add proper interface code (.gfx) and graphic files. You can copy the vanilla interface/domestic_offmaps.gui, renaming it and change in the references for the window. You can then decide to change any elements or keep china stuff.
You can blank the statuses and policies.

examples :
the common/offmap main file
offmap_hre = {
name = hre_hre
window_name = domestic_offmaps_window_HRE
button_name = icon_offmaps_entry_HRE
currency_name = TXT_GRACE_HRE
currency_gain = monthly_grace
currency_reset_on_dynasty_change = yes
holder_title = title_empereur # minor title used to identify a character as holder of this offmap power
# governor_title = k_kleinburgund
governor_title = k_kleinburgund
# governor_title = e_hre
tier = emperor
non_aggression_modifier = peace_deal_with_china
coa_religion = catholic
government = feudal_government
beginning_of_history = 962.2.2
#sound = china_interaction_interface
display_trigger = {
#has_dlc = "Jade Dragon"
#diplo range (region, variable upon the fact the emperor is crowned as king of burgundy or not)
}
policies = {
hre_imperium_high
hre_imperium_low
hre_imperium_null
}
statuses = {
hre_stability_golden_age
hre_stability_stable
hre_stability_chatastrophe
}
Policies and statuses are defined in their respectives folders and files BTW

interface file :
This is the kind of code you need to change the offmap button look.
The pink text is what links the offmap power definition to its specific icon.
This piece of code have to be in a new dedicated .gui file. The name can be whatever (with no spaces by the way)
guiTypes = {
windowType = {
name = "icon_offmaps_entry_HRE"
backGround =""
position = { x = 0 y = 0 }
size = { x = 50 y = 50 }
moveable = 0
dontRender = ""
horizontalBorder = "0"
verticalBorder = ""
fullScreen = no
Orientation = "UPPER_LEFT"

guiButtonType = {
name = "icon_offmaps"
position = { x=0 y=0 }
quadTextureSprite ="GFX_hre_screen_button"
clicksound = click_02
}
}
}
Green text is how your button graphics are referenced in a .gfx file where in turn that GFX_hre_screen_button is linked to the filename of your button.
spriteTypes = {
spriteType = {
name = "GFX_hre_screen_button"
texturefile = "gfx\\interface\\offmap_screen\\hre_screen_button.dds"

}
}
hre_screen_button.dds
is the name of the button itself.
Adding a dedicated offmap screen/window works on the method as the button's.

Hope this can help ;)
 
Last edited:
Thanks Arko. I already have the offmap set up, was just trying to figure out where to go from there.