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
