Custom House, How To?

For specific technical issues and questions.

Custom House, How To?

PostPosted by Epicmarkvan » Tue Jul 25, 2017 20:52

Attempting to develop my own personal little submod here. Want to create my own personal house, coat of arms and all, and put it into a toggleable mod that won't interfere with the main mod and that I won't have to update too often. Now, I'll admit, I'm quite inexperienced when it comes to CK2 modding. I've often edited others code, but creating something from scratch is a foreign concept for me. I am, however, adamant on doing it.

I want to create the house, give it it's own custom history/family tree, give it a coat of arms I can enable dynamic COA with, and give it a title. I'm debating between a temp title or an actual county, but I feel temp title is both more immersive and less likely to interfere with the main mod at any point. Any help you folks could give me would be appreciated.
Image
User avatar
Epicmarkvan
 
Posts: 34
Joined: Tue Sep 15, 2015 05:27
Location: New Hampshire, USA

Re: Custom House, How To?

PostPosted by chosenbyfew » Fri Jul 28, 2017 14:13

Making new stuff is really very similar to modifying existing stuff when you have templates, which, helpfully, you do!

First, the dynasty itself:
Code: Select all
mod\A Game Of Thrones\common\dynasties\insert_your_new_filename_here.txt
59 = { #you'll use some other number not already taken
   name="Stark" #whatever last name you want to have
   culture = northman
   coat_of_arms = { #these are gonna be complicated
      template = 0 #there's probably guides for what each thing looks like
      layer = {
         texture = 5
         texture_internal = 41
         emblem = 0
         color = 0
         color = 0
         color = 0
      }
   }
}


Next, characters: this is where it gets *stupidly tedious* because you have to manually create every single character in your history. All the thousands of characters that exist throughout the entire 8000 year history? The devs coded every single one of those by hand. Not the most fun thing ever, but it's rewarding when you're done. Anyway:
Code: Select all
\mod\A Game Of Thrones\history\characters\your_dynasty_name.txt
59 = { #again, some other number not already taken
   name="Eddard"
   dynasty=59 #here you'll use the dynasty number you created earlier
   
   dna="ddglfridbcr" #dna and properties determine the character portrait
   properties="0e00c" #there's in-depth guide about that elsewhere
   
   martial = 8 #this section has all the base character stats
   diplomacy = 9
   intrigue = 1
   stewardship = 6
   learning = 5
   
   religion="old_gods" #religion and culture, self explanatory
   culture="northman"
   
   add_trait="honest" #traits for the character to have no matter what
   add_trait="brave"
   #add_trait="shy"
   add_trait="temperate"
   add_trait="proud"
   add_trait="honorable"
   add_trait="trusting"
   add_trait="just"
   #add_trait="house_stark"
   add_trait="authoritative"
   
   add_trait=heavy_infantry_leader
   add_trait=back_seat_leader
   disallow_random_traits = yes #when creating characters, the game adds random traits unless you tell it not to

   father=2058 #character number of the father
   mother=42058 #Lyarra Stark #character number of the mother (can be helpful to comment their name, as here)
   
   #here is a series of dates and events that occur for this character on those dates
   #this is how the game determines the state of the world for any month you want, in that 1000 year span
   8263.1.1 = {birth="8263.1.1" effect = { set_character_flag = ned_stark } }
   8269.1.1 = { guardian = 94002 } # Jon Aryn
   8273.1.1 = {
      effect = { #Robert
         add_friend = 317
      }
   }
   8279.1.1 = {
      add_trait="skilled_tactician"
      add_trait="skilled_warrior"      
   }
   8279.1.1 = {
      effect = {
         add_friend = 94002 #Jon Arryn
         add_friend = 126 #Howland Reed
      }
   }   
   8282.1.1 = {
      add_spouse = 1059
      add_trait="ice"
      effect = {
         #lore children
         character_event = { id = lore_children.1 days = 365 random = 180 }
      }
   }
   8282.9.15 = { #RR
      effect = {
         if = {
            limit = { NOT = { year = 8284 } }
            set_character_flag = TOJ_leader
            character_event = { id = roberts_rebellion.6 }
            set_defacto_liege = THIS
            k_stormlands = {
               holder_scope = {
                  ROOT = {
                     join_attacker_wars = PREV
                  }
               }
            }
         }
         any_vassal = { set_character_flag = against_king  }
         set_character_flag = against_king
         set_character_flag = warden_of_the_north
         c_77037 = {
            opinion = {
               modifier = opinion_joined_rebellion
               who = ROOT
               years = 20
            }
            opinion = {
               modifier = opinion_traitor
               who = ROOT
            }
         }
         c_317 = {
            reverse_opinion = {
               modifier = opinion_with_rebel_leader
               who = ROOT
               years = 100
            }
         }
         if = {
            limit = {
               ai = no
               NOT = { year = 8284 }
            }
            spouse = { impregnate = ROOT } #Robb
         }   
      }
   }   
   8284.1.1 = { #CS
      effect = {
         character_event = { id = roberts_rebellion.14 }
         any_vassal = { clr_character_flag = against_king  }
         clr_character_flag = against_king
         set_character_flag = one_beheading
         set_character_flag = experienced_beheader
         set_character_flag = ned_stark
         clr_character_flag = warden_of_the_north
         c_317 = {
            reverse_remove_opinion = {
               modifier = opinion_with_rebel_leader
               who = ROOT
            }
         }
      }
   }   
   8288.1.1 = {
      effect = { spouse = { add_lover = ROOT } } #Formed a loving relationship
   }
   8298.10.28 = {
      effect = {
         e_iron_throne = {
            holder_scope = {
               ROOT = { imprison = PREV }
               opinion = { who = ROOT modifier = opinion_conspired_against_me }
               mother = {
                  opinion = { who = ROOT modifier = opinion_conspired_against_child }
               }
            }
         }
      }
   }
   8298.11.2 = {
      add_trait = dead_target #For the finding Stark children events
      # The death that needs no explanation!
      death = {
         death_reason = death_execution_beheading
         killer = 9316
      }
   }
}


Now you may have noticed the character file didn't say anything about Ned owning Winterfell. Well that's because that's in yet another file. And here is where it will get difficult to "only add" to the mod's files without changing the existing ones, because, so far, you've just been adding characters. But now, we have to determine a location to give them, and to do that, we have to either modify an existing location, or add an entirely new location to the map. Either way, you couldn't complete that without modifying one of the mod's files. Anyway, here's the location file info:
Code: Select all
\mod\A Game Of Thrones\history\titles\c_winterfell.txt #c for county, b for barony, d for duchy, etc.
20.1.1={
   holder=821059
   liege="d_winterfell"
   law = succ_primogeniture
   #Brandon the Builder
}
110.1.1 = {
    holder = 826059 # Brandon, son of Bran the builder
}
130.1.1 = {
    holder = 827059 # Jon
}      
150.1.1 = {
    holder = 0 #nobody
}
#the file is much larger, but you get the idea


So there you go. I probably missed something, since I've never actually created a dynasty, I just took a look because your question intrigued me. But that should be enough to get your dynasty off the ground.
chosenbyfew
 
Posts: 45
Joined: Sat Jul 22, 2017 05:44

Re: Custom House, How To?

PostPosted by salatrin » Fri Jul 28, 2017 18:01

just one thing i wanted to point out, in ur character file section...

dna="ddglfridbcr" #dna and properties determine the character portrait
properties="0e00c" #there's in-depth guide about that elsewhere

The DNA part is JUST ur characters physical appearance (neck, chin, mouth, nose, etc.)

and then properties is everything else in the portrait such as background, headgear, clothing, scars.

Probably the easiest way to get those results for your characters is to start a game, use ruler designer and create each character how you want them to look, (ignore the stats and traits) then ingame use console and enter charinfo and then hover over ur created character and write down the dna and properties code and then insert theminto ur character file for each character (i find the easiest way to do that last part is to keep console open when u check the charinfo and enter the dna code directly into the console then highlight it and ctrl X to cut then alt tab to ur character file to paste and then repeat with the properties)

but then again, if u know what each part in the code represents and the value for each thing that you want( as i do for high valyrian characters hehe but dont know them for any other cultures as ive only ever made high valyrians. For example, the second last character in the dna code which is for eye color i use 'a' or 'b' for all my characters to give them 1 of 2 shades of purple eyes) then u can just enter each string directly
salatrin
 
Posts: 69
Joined: Thu May 04, 2017 23:27

Re: Custom House, How To?

PostPosted by Epicmarkvan » Fri Jul 28, 2017 19:54

Holy crap man, thank you! I appreciate this so much! You basically held my hand here, which is more than I was expecting. Thank you tons, dude!

Question though, if I wanted to make an unlanded title that would allow me to play the character, how would I do that? Kind of like how Daenerys has the Great Grass Sea which doesn't have any land, but is still playable even if she doesn't have land(Unless that was changed, but I'm pretty sure it used to be like that.)

Also, if I wanted to set my own custom made image as my coat of arms, is there anything special I need to put in that first dynasty file?

AND ONE LAST THING....sorry..... Is Dynamic COA going to work by default if I set this up as a premade dynasty by default, or is there anything special I gotta do?
Image
User avatar
Epicmarkvan
 
Posts: 34
Joined: Tue Sep 15, 2015 05:27
Location: New Hampshire, USA

Re: Custom House, How To?

PostPosted by salatrin » Sat Jul 29, 2017 01:21

Coat of arms i havent touched yet so no idea how to do custom images and whatnot as my custom dynasty are just distant decendants of the blackfyre dynasty so i use their CoA

As for landless titles, when i saw this part i got curious so decided to put my minimal modding abilities to the test and attempted to create a scenario where my character starts of landless in the 8300 scenario and to help Aegon take the stormlands and then march on dragonstone myself and claim it as my starting base for my world conquest. and a few hours later, i finally got it, woohoo.

Anyways, there is quite a few steps involved.
First creating the landless title itself which is the easy part as i just used the rogue princes title as a base and copied the file, then renamed it to my own and it looks like this(my character id is 999999 but just change that to ur own character and also i wanted my character starting in pentos but not sure if that line is necessary but added it just in case.

Spoiler: show
20.1.1={
active = no
}
8300.1.1 = {
active = yes
holder=999999
liege="k_pentos"
law = succ_primogeniture
law = cognatic_succession
law = slavery_0
}


Also ull need to add a localization for the title to give it the name you want in game otherwise it will just appear in game as d_namehere

For the rest i had to look through all the files to find the correct lines id need to add to where they needed to be and edited them for my own character/dynasty

Anyways, i created a custom event to spawn me a 6k army along with a narrative that appears at the start of the game telling my characters starting story which ill leave out the details but will post event i made to give you an idea of what u need and u can change what u need accordingly.

Spoiler: show
namespace = blackfyre
character_event = {
id = blackfyre.1
desc = "EVTDESCblackfyre.1"

hide_from = yes

is_triggered_only = yes

immediate = {
set_defacto_liege = ROOT
any_courtier = {
limit = {
culture = high_valyrian
has_game_rule = { name = high_valyrian_cull value = on }
dynasty = 0
is_ruler = no
NOT = { father_even_if_dead = { always = yes } }
NOT = { has_dynasty_flag = high_valyrian }
NOT = { has_character_flag = high_valyrian }
}
death = yes
}
spawn_unit = {
province = 406
home = 406
owner = ROOT
leader = 999999
troops = {
archers = { 300 300 }
heavy_infantry = { 800 800 }
light_infantry = { 500 500 }
light_cavalry = { 300 300 }
knights = { 100 100 }
}
attrition = 1.0
earmark = dummy
}
spawn_unit = {
province = 406
home = 406
owner = ROOT
leader = 9999991
troops = {
archers = { 300 300 }
heavy_infantry = { 800 800 }
light_infantry = { 500 500 }
light_cavalry = { 300 300 }
knights = { 100 100 }
}
attrition = 1.0
earmark = dummy
}
spawn_unit = {
province = 406
home = 406
owner = ROOT
leader = 9999993
troops = {
archers = { 300 300 }
heavy_infantry = { 800 800 }
light_infantry = { 500 500 }
light_cavalry = { 300 300 }
knights = { 100 100 }
}
attrition = 1.0
earmark = dummy
}
spawn_fleet = {
province = 406
home = 406
owner = ROOT
disband_on_peace = no
troops =
{
galleys = { 100 100 }
}
}
}
option = {
name = "EVTOPTAblackfyre.2"
}
}


Just in case, the option section at the end is the button that comes up at bottom of event window to close out the event, you can use the localization files to make it anything you want it to be.

And the last part and the part i struggled with most was making the character actually playable and to do that, u need to give him a temporary land title(can even be a barony) and then a line that removes the title right at game start if u dont want to have a pointless title following you around.

Since im starting in Pentos region, i decided to use Spicer Tower as my temp title so went into the history title file for that title and just added the line at the very end to give me temporary control

8300.1.1 = { holder = 999999 }

and then i edited my character file and added the line to remove this title right at game start and give it back to its previous owner at the end of the section for my character.

Spoiler: show
8300.1.1 = {
effect = {
add_friend = 77041
add_friend = 125009
if = { limit = { NOT = { year = 8301 } }
set_character_flag = duchy_adventurer
character_event = { id = blackfyre.1 }
}
# the workaround to give temp title back to its previous owner
if = {
limit = { has_landed_title = b_spicertowers }
b_spicertowers = { k_pentos = { holder_scope = { gain_title = PREVPREV } } }
}
}
}


Only thing i havent done yet is the line of code to remove the landless title once im officially landed but im not too concerned about that atm.

Edit: Oops, forgot a couple key steps.

Another thing you will need to add is in the common\landed titles.txt file, ull need to add an entry for your landless host title or else u will get game over the instant the game starts.

Spoiler: show
d_blackfyre_host = {
color={ 120 0 0 }
color2={ 220 220 220 }

allow = { always = no }

dignity = 10

capital = 406 #Pentos

# Always exists
landless = yes

religion = rhllor
culture = high_valyrian
}


Again just change the things to match your own settings such religion/culture and the title itself at the top.
And the last thing i did and not sure if it necessary but i couldnt find any other way to choose my landless character at the start so i added him to the interesting character list for the bookmark that i am going to be playing.

This file is found in the common\bookmarks folder and open up the 00_bookmarks.txt file and i added the following line in the section of the bookmark im playing which in this case is AFFC so just added it to the very end of the file

Spoiler: show
selectable_character = {
id = 999999
}


And just change id to the char id of the character ull be playing as.

It might not be perfect but considering my minimal experience at this, it works for me and thats all i care about :)
salatrin
 
Posts: 69
Joined: Thu May 04, 2017 23:27

Re: Custom House, How To?

PostPosted by Epicmarkvan » Sat Jul 29, 2017 02:10

Beautiful work there, man. I went a different path, though. I took a look at the Congenital Overhaul mod and I used his method where he basically created a barony under an existing county for the character to hold. So I can't exactly directly select them at game start, or play them really, but it's working! Now I just need to figure out how to get my custom Coat of Arms in...cause I really like it.

Image

I think I did a good job with it, for an amateur. I felt like the North was missing any Valyrians, so my house is Westerosi Valyrians who worship the Old Gods and descend from a Blackfyre bastard.

EDIT: Figured out how to do the Coat of Arms. There's a file under interface that you need to path it to.

EDIT TAKE 2:SCRATCH THAT, nope. It's just coming up grey now....ugh.
Image
User avatar
Epicmarkvan
 
Posts: 34
Joined: Tue Sep 15, 2015 05:27
Location: New Hampshire, USA

Re: Custom House, How To?

PostPosted by chosenbyfew » Sat Jul 29, 2017 02:53

This is going to get long, so I put everything in spoiler tags.

Unlanded title generation:
Spoiler: show
Epicmarkvan wrote:Question though, if I wanted to make an unlanded title that would allow me to play the character, how would I do that? Kind of like how Daenerys has the Great Grass Sea which doesn't have any land, but is still playable even if she doesn't have land(Unless that was changed, but I'm pretty sure it used to be like that.)

salatrin's guide is pretty good. I can add more depth to the localisation explanation if you want. Whereas you can "map" most code strings to mean different things, localisation strings for things that aren't event-related are almost always hard-coded, from what I've seen.


Custom coats of arms:
Spoiler: show
Epicmarkvan wrote:Also, if I wanted to set my own custom made image as my coat of arms, is there anything special I need to put in that first dynasty file?

You wouldn't put it in the dynasty file. If you're looking to add a new coat of arms, you need the coats_of_arms.txt file. Coats of arms, interestingly, are tied to religion and not to dynasty. Which makes sense when you think about how the base game is historic Europe, where the patterns for coats of arms can be reliably tied to religion, or at least to region. And here you would also need to modify the existing coats_of_arms.txt file as opposed to adding your own, since I don't believe the game will load secondary coats of arms files. (I deviated from my pattern of using the section that refers to the Starks because the Starks belong to the Old Gods, whose coat of arms "culture" section is HUGE, sorry if that makes it confusing)
Code: Select all
\mod\A Game Of Thrones\interface\coats_of_arms.txt
culture = {
   religion = { #a list of religions that the coats of arms can apply to
      "dothraki_pagan"
      "great_shepherd"
   }
   
   templates = { #base templates that are allowed, aka the create-a-character in-game-custom coa's
      "coa_plain_pagan:1"
   }

   color = { #allowable colors for each field on the template pattern
      { 250 250 250 }   #0  Silver
      { 245 195 10 }   #1  Gold
      { 70 70 70 }   #2  Black
      { 120 120 120 }   #3  Grey
      { 125 70 35 }   #4  Deep Brown
      { 165 120 65 }   #5  Light Brown
      { 190 160 60 }   #6  Tan
      { 180 75 60 }   #7  Mauve
   }
   
   rebel_colors = { 12 13 14 } #specific colors to use for rebels when they rise against their liege

   banned_colors = #colors that cannot be used - i don't know why this would be here if you have to whitelist colors above, but i dunno, im not a doctor :P
   {
      { 0 1 3 }               #0
      { 1 0 }               #1
      { 2 4 }               #2
      { 0 3 4 5 6 7 }               #3
      { 2 3 4 5 6 7 }               #4
      { 3 4 5 6 7 }               #5
      { 3 4 5 5 7 }               #6
      { 3 4 5 6 7 }               #7
   }

      #here are some examples of emblems that can be used
   emblem = {
      file = "gfx\\coats_of_arms\\emblem_muslim.dds" #base filepath for the emblem texture file. emblems are static-colored images that go on top of the coats of arms. the base game has things like crowns and scepters, for example.
      noOfFrames = 1 #only one frame, so you dont need to specify a size
   }

   # WHEN ADDING NEW, ALWAYS ADD AT THE END
   textures = {
      texture = {
         file = "gfx\\coats_of_arms\\pattern_mongol.tga"
         size = { x = 10 y = 6 } #the number of columns and rows, respectively, of the emblems held in the file
         noOfFrames = 59 #if you notice, 10*6 is 60, but if you look at that file, theres a hole in the bottom right, so this tells the game to only read 59 of the 60 sections that the "size" code divided the file into. it reads left to right, top to bottom, the same way you read text.
         color = 2 #default color to be used for this texture, from the color section above. first is 0, second is 1, etc.
         emblem = no #whether or not you're allowed to place emblems on these textures
      }
      texture = {
         file = "gfx\\coats_of_arms\\pattern2_mongol.tga"
         size = { x = 1 y = 1 }
         noOfFrames = 1
         color = 1
         emblem = no
      }
      texture = {
      # Jylland, Kiev, Livonia, Meath, Novgorod, Orkney, Ostlandet, Sjaelland, The Isles, Trondelag, Uppland, Vastergotland, York
         file = "gfx\\coats_of_arms\\pagans.tga"
         size = { x = 13 y = 1 }
         noOfFrames = 13
         color = 0
         random = no # Do not use for random CoAs
      }
   }
}

Now, remember the dynasty layout? In case you don't, here it is again. And this time, I explain in-depth what the coat_of_arms section means (mainly because I didn't know at the time, and because I poked around in the coats_of_arms.txt file, now I do. yay!)
Code: Select all
mod\A Game Of Thrones\common\dynasties\insert_your_new_filename_here.txt
59 = { #you'll use some other number not already taken
   name="Stark" #whatever last name you want to have
   culture = northman
   coat_of_arms = { #the coat of arms possibilities are restricted in the coats_of_arms.txt file by which religion group the culture falls under. (in the mod, the Old Gods count as christian, so the Starks use the "christian" section)
      template = 0 #which of the templates to use, in this case "plain"
      layer = { #describes the settings for the "first" (only, in most cases) layer of that template
         texture = 5 #this determines which of the "texture" sections inside the "textures" section is used for this dynasty - in this case, the sixth one (0 is first)
         texture_internal = 41 #which icon (left-to-right, top-to-bottom) to use from the texture file in that section
         emblem = 0 #which emblem to super-impose over it
         color = 0 #which color to use for the first field
         color = 0 #which color to use for the second color field
         color = 0 #which color to use for the third color field
      }
   }
}


Dynamic coats of arms:
Spoiler: show
Epicmarkvan wrote:AND ONE LAST THING....sorry..... Is Dynamic COA going to work by default if I set this up as a premade dynasty by default, or is there anything special I gotta do?

Here's where things begin to get REALLY complicated. The game wants to use the province flags on the map, so what needs to be done to use dynasty flags for the map, is to create a dummy province for your dynasty, then use hidden events to make sure that title is always your "hidden main" title. Let's take a look:
Code: Select all
\mod\A Game Of Thrones\common\landed_titles\dynamic_coa_titles.txt
##dummy titles to allow the changing of other title's coats of arms dynamically
c_stark = { #an imaginary county, the County of Stark
   color={ 180 180 180 }
   color2={ 255 255 255 }
   
   allow = {
      always = no
   }
}


If you'll notice, it doesn't specify a flag/coat of arms for that title. That's because flags aren't specified in the game files, their paths are hard-coded into the game engine. So to find the c_stark flag, you would go to \mod\A Game Of Thrones\gfx\flags\ and look for c_stark.tga - who would've thought, that flag looks suspiciously like the Stark coat of arms! This is a kind of hacky way to tell the game to use the same flag as the coat of arms, by manually handing it a flag that looks exactly like out coat of arms.

Now we're going to take a look at how to assign that imaginary county's flag to be the main coat of arms:
Code: Select all
\mod\A Game of Thrones\common\scripted_effects\dynamic_coa_effects.txt
set_dynamic_coa_effect = {
   ...
   ###North###
   if = {
      limit = { holder_scope = { dynasty = 59 } } #if the holder of a title is of the Stark dynasty
      set_coa = c_stark #set their coat of arms to the flag of the County of Stark
   }
   ...
}


And last but not least, we have to make the game actually assign that title as the one to use for the coat of arms. The AGOT devs did that through use of an event that fires on game load. I won't go into the whole event tree, because it's really long and it works as is, as long as you plug your dynasty into it. We'll do that here:
Code: Select all
\mod\A Game of Thrones\events\dynamic_coa_events.txt
...
   immediate = { #the event fires on game load, so this runs at the beginning of the first day
      if = {
         limit = { NOT = { has_global_flag = dynamic_coa_initialised } } #as long as we haven't changed flags yet
         any_character = {
            limit = {
               OR = { #any character that belongs to one of these dynasties
                  dynasty = 496 
                  dynasty = 57 
                  dynasty = 7000 
                  dynasty = 52 
                  dynasty = 364 
                  dynasty = 38 
                  dynasty = 30 
                  dynasty = 1440 
                  dynasty = 36 
                  dynasty = 50 
                  dynasty = 41 
                  dynasty = 174411 
                  dynasty = 42 
                  dynasty = 1197 
                  dynasty = 174410 
                  dynasty = 51 
                  dynasty = 45 
                  dynasty = 46 
                  dynasty = 59
                  dynasty = 87
                  dynasty = 1559
                  dynasty = 93 
                  dynasty = 89 
                  dynasty = 80 
                  dynasty = 62 
                  dynasty = 68 
                  dynasty = 79 
                  dynasty = 84 
                  dynasty = 126 
                  dynasty = 102 
                  dynasty = 63859 
                  dynasty = 1443 
                  dynasty = 70 
                  dynasty = 83 
                  dynasty = 101 
                  dynasty = 60 
                  dynasty = 61 
                  dynasty = 88 
                  dynasty = 104 
                  dynasty = 105 
                  dynasty = 106 
                  dynasty = 159 
                  dynasty = 601 
                  dynasty = 127 
                  dynasty = 150 
                  dynasty = 128 
                  dynasty = 153 
                  dynasty = 157 
                  dynasty = 137 
                  dynasty = 174435 
                  dynasty = 174430 
                  dynasty = 174432 
                  dynasty = 174399 
                  dynasty = 355 
                  dynasty = 146 
                  dynasty = 356 
                  dynasty = 143 
                  dynasty = 359 
                  dynasty = 178 
                  dynasty = 161 
                  dynasty = 174 
                  dynasty = 187 
                  dynasty = 177 
                  dynasty = 182 
                  dynasty = 186 
                  dynasty = 176 
                  dynasty = 189 
                  dynasty = 190 
                  dynasty = 197 
                  dynasty = 196 
                  dynasty = 227 
                  dynasty = 228 
                  dynasty = 221 
                  dynasty = 208 
                  dynasty = 216 
                  dynasty = 233 
                  dynasty = 199
                  dynasty = 207 
                  dynasty = 213 
                  dynasty = 230 
                  dynasty = 217 
                  dynasty = 225 
                  dynasty = 200 
                  dynasty = 212 
                  dynasty = 203 
                  dynasty = 253 
                  dynasty = 1254 
                  dynasty = 296 
                  dynasty = 285 
                  dynasty = 281 
                  dynasty = 235 
                  dynasty = 250 
                  dynasty = 298 
                  dynasty = 270 
                  dynasty = 1428 
                  dynasty = 288 
                  dynasty = 261 
                  dynasty = 247 
                  dynasty = 258 
                  dynasty = 265 
                  dynasty = 260 
                  dynasty = 317
                  dynasty = 498                  
                  dynasty = 1544 
                  dynasty = 316 
                  dynasty = 330 
                  dynasty = 329 
                  dynasty = 306 
                  dynasty = 307 
                  dynasty = 319 
                  dynasty = 54 
                  dynasty = 303 
                  dynasty = 301 
                  dynasty = 9110 
                  dynasty = 302 
                  dynasty = 304 
                  dynasty = 321 
                  dynasty = 327 
                  dynasty = 322 
                  dynasty = 311 
                  dynasty = 1 
                  dynasty = 16 
                  dynasty = 14 
                  dynasty = 12 
                  dynasty = 13 
                  dynasty = 10 
                  dynasty = 9 
                  dynasty = 15 
                  dynasty = 18 
                  dynasty = 20 
                  dynasty = 4 
                  dynasty = 107 
                  dynasty = 66 
                  dynasty = 110 
                  dynasty = 120 
                  dynasty = 116 
                  dynasty = 118 
                  dynasty = 174421 
                  dynasty = 174419 
                  dynasty = 174420 
                  dynasty = 122 
                  dynasty = 112 
                  dynasty = 121 
                  dynasty = 114 
                  dynasty = 119 
                  dynasty = 109
                  dynasty = 149
                  dynasty = 45000204 
                  dynasty = 45000205 
                  dynasty = 45000206 
                  dynasty = 45000207 
                  dynasty = 45000228 
                  dynasty = 45000229 
                  dynasty = 45000230 
                  dynasty = 45000231 
                  dynasty = 45000200 
                  dynasty = 45000201 
                  dynasty = 45000202 
                  dynasty = 45000203 
                  dynasty = 45000209 
                  dynasty = 45000210 
                  dynasty = 45000208 
                  dynasty = 45000214 
                  dynasty = 45000215 
                  dynasty = 45000216 
                  dynasty = 45000217 
                  dynasty = 45000218 
                  dynasty = 45000219 
                  dynasty = 45000236 
                  dynasty = 45000237 
                  dynasty = 45000238 
                  dynasty = 45000239 
                  dynasty = 45000220 
                  dynasty = 45000211 
                  dynasty = 45000212 
                  dynasty = 45000213 
                  dynasty = 45000224 
                  dynasty = 45000225 
                  dynasty = 45000226 
                  dynasty = 45000227 
                  dynasty = 45000232 
                  dynasty = 45000233 
                  dynasty = 45000234 
                  dynasty = 45000235 
                  dynasty = 237
                  dynasty = 234
                  dynasty = 248
                  dynasty = 496029
               }
            }
            set_dynasty_flag = has_dynamic_coa #tell the game they have their own coat of arms to use
         }
         set_global_flag = dynamic_coa_initialised #tell the game we've already assigned dynamic coa's
      }
---
}


It should be noted that you can add your dummy county and set_coa effect in your own files, and for the event you need to copy the entire dynamic_coa.0 event to a new file, give it a new ID, change the limit section to point only to your dynasty, and change the name of the global flag to something else. (You can leave it as referring to dynamic_coa.1 because you'll be using it with the mod already so there's no reason to copy the other events) In that way, you can make your dynamic coa completely independent of the main mod's. If you do make your own copy of the dynamic_coa.0 event, make sure you also make another new file:
Code: Select all
\mod\A Game Of Thrones\common\on_actions\01_on_actions.txt
on_startup = {
events = {
#insert the name of your custom dynamic_coa.0 event here
}
}


Dear sweet baby Jesus, all of that was incredibly roundabout. I really have a new appreciation for all of the crap these devs went through to get this stuff to us. I NEVER would've figured that out.


Hopefully that is good enough to get you your own dynasty with its own coat of arms that can use it as its flag. Cheers!
Last edited by chosenbyfew on Fri Aug 04, 2017 01:32, edited 1 time in total.
chosenbyfew
 
Posts: 45
Joined: Sat Jul 22, 2017 05:44

Re: Custom House, How To?

PostPosted by salatrin » Sat Jul 29, 2017 16:30

Seems i cant figure out how to remove the landless title after i get land, im pretty sure i know what the actual code is to do so, but i cant figure out a trigger to get it to fire off.

Tried looking at the Rogue prince, blackfyre rebellion and Dany's questline before she takes meereen and only the last one seems to be close to mine but i cant figure out what makes hers trigger and mine not to.

Basically what im looking to do as mentioned earlier is to start off landless based out of Pentos which is working perfectly fine for me, then help Aegon take the Stormlands from Stannis before Tommen takes out Stannis first.
Then after Aegon defeats Stannis, he then goes off to attack the iron throne leaving me with the perfect chance to take Dragonstone as that is all Stannis is left with. Then after taking Dragonstone, I rejoin Aegons fight and help him take the iron throne.

My issue is, after i take the high lordship of Dragonstone(along with the lordship itself as well) my character keeps the landless title when i want him to lose it at that point.

Spoiler: show
if = {
activate_title = { status = no title = d_blackfyre_host }
d_blackfyre_host = {
destroy_landed_title = ROOT
}
}


I THINK this is the line of code that should ultimately remove the title(changed to match my own landless title of course)as its the one thing consistant with all 3 of Daemon Targ, Daemon Blackfyre and Dany pre-Meereen but i cant figure out what id need to add to it to get the event to actually trigger and that is what im struggling with.
salatrin
 
Posts: 69
Joined: Thu May 04, 2017 23:27

Re: Custom House, How To?

PostPosted by Epicmarkvan » Sat Jul 29, 2017 19:08

I'm still having a lot of trouble getting my CoA to display...otherwise everything works fine. Not sure what I'm doing wrong. Lancelot from Congenital Overhaul managed to get his own custom coat_of_arms.txt and his CoA work, but I can't seem to do the same...ugh.
Image
User avatar
Epicmarkvan
 
Posts: 34
Joined: Tue Sep 15, 2015 05:27
Location: New Hampshire, USA

Re: Custom House, How To?

PostPosted by salatrin » Sat Jul 29, 2017 20:33

Woohoo! Got the remove landless title event to work after all, it appears i was using the right trigger the whole time.
My problem was i had another line in there that i thought was needed to get it to trigger but then found out it was actually what was preventing the actual trigger so now as soon as my character gains the dragonstone duchy title, his landless title goes buh bye.
Its probably pretty messy codewise but it worked so thats good enough for me.
salatrin
 
Posts: 69
Joined: Thu May 04, 2017 23:27

Re: Custom House, How To?

PostPosted by chosenbyfew » Sun Jul 30, 2017 00:31

Epicmarkvan wrote:I'm still having a lot of trouble getting my CoA to display...otherwise everything works fine. Not sure what I'm doing wrong. Lancelot from Congenital Overhaul managed to get his own custom coat_of_arms.txt and his CoA work, but I can't seem to do the same...ugh.

What seems to be the issue? Did the coat of arms work but the dynamic CoA not? Is the coat of arms showing a vanilla one, or is it blank?

salatrin wrote:Woohoo! Got the remove landless title event to work after all, it appears i was using the right trigger the whole time.
My problem was i had another line in there that i thought was needed to get it to trigger but then found out it was actually what was preventing the actual trigger so now as soon as my character gains the dragonstone duchy title, his landless title goes buh bye.
Its probably pretty messy codewise but it worked so thats good enough for me.

As long as there's nothing left behind by the code that would count as garbage, then however messy it is doesn't matter. It's something that will only run once, so even if it took 2 seconds to run (it probably takes .08 seconds at the worst) then it's only a one-time thing and it doesn't even matter.
chosenbyfew
 
Posts: 45
Joined: Sat Jul 22, 2017 05:44

Re: Custom House, How To?

PostPosted by Epicmarkvan » Sun Jul 30, 2017 01:16

chosenbyfew wrote:
Epicmarkvan wrote:I'm still having a lot of trouble getting my CoA to display...otherwise everything works fine. Not sure what I'm doing wrong. Lancelot from Congenital Overhaul managed to get his own custom coat_of_arms.txt and his CoA work, but I can't seem to do the same...ugh.

What seems to be the issue? Did the coat of arms work but the dynamic CoA not? Is the coat of arms showing a vanilla one, or is it blank?


Regular Coat of Arms. My custom image, It's just grey. A few lines of streaking grey. Only other thing I seem to get is a white eagle on a brown field if I change the texture number. Not sure what I did wrong. :/
Image
User avatar
Epicmarkvan
 
Posts: 34
Joined: Tue Sep 15, 2015 05:27
Location: New Hampshire, USA

Re: Custom House, How To?

PostPosted by chosenbyfew » Sun Jul 30, 2017 02:33

Epicmarkvan wrote:Regular Coat of Arms. My custom image, It's just grey. A few lines of streaking grey. Only other thing I seem to get is a white eagle on a brown field if I change the texture number. Not sure what I did wrong. :/

Changing the texture number will change to the next texture category in that textures block, so you don't want to do that.

If you're getting streaky lines, I'd assume that the image file isn't compressed in a way the game likes it to be. Have you tried opening it in paint.net or photoshop and saving it as a .tga? A .dds might work too, if you use the A8R8B8G8 compression method. (At least, I would assume it'd be that method, as that's how the artifact images are saved)
chosenbyfew
 
Posts: 45
Joined: Sat Jul 22, 2017 05:44

Re: Custom House, How To?

PostPosted by Epicmarkvan » Sun Jul 30, 2017 17:08

I used Paint.net to make it, and it's saved as a tga. I had the same idea, but unless the paint.net settings compress weird idk.
Image
User avatar
Epicmarkvan
 
Posts: 34
Joined: Tue Sep 15, 2015 05:27
Location: New Hampshire, USA

Re: Custom House, How To?

PostPosted by Epicmarkvan » Sun Jul 30, 2017 22:01

Here's a picture of what it looks like in-game.

Image

Super confused why this is happening. It's TRYING to load the image file, or at least it looks that way, but it doesn't seem to be working. :/

EDIT: I'm convinced it's looking at the image file wrong, somehow. I added some dummy tiles in next to it and it changed to white when I test it now, pure white (I used the default dummy shield in the base mod tgas). Which means it seems to only be reading, or displaying part of the file. I tried both compression methods paint.net uses, but no dice. I might just remake the image in another software and see if that works.

Second Edit: That didn't work either...... >.< Wish SinStar or someone would see this and be like "oh hey that's what's wrong" cause I'm at the end of my ropes here.
Image
User avatar
Epicmarkvan
 
Posts: 34
Joined: Tue Sep 15, 2015 05:27
Location: New Hampshire, USA

Re: Custom House, How To?

PostPosted by chosenbyfew » Mon Jul 31, 2017 02:13

It looks to me like the color of the coat of arms in game is the exact same color as the background of your custom coat of arms, which, 99% chance (assuming I eyeballed the colors correctly), means your custom coat of arms file has too high of a resolution. If it's higher than 128x128, try resizing it down to that size and trying again. The image you shared before WAS 128x128. I'm used to looking at images on my 4K monitor, not my 1K monitor, so I thought it was much larger than it was.

If you added another thing next to it, you might want to specify the number of columns in the texture field of the coat of arms file so it knows to look at only part of that file. If you tried that already, give me a bit and I'll see if I can come up with another idea.

In the dynasty file, are you making sure your texture_internal number is at base 0? If you've got texture_internal = 1 when the image you want is in the very top left (or is the only image in the file), that would screw it up.

EDIT: Every time I try to download your image to test it in my own game, it says it's corrupted. I know it's a png and not the tga you're working with, but could it be a corrupted image file? Seems like the file should have a variable that tells the computer whether to use its own colors or colors that have been saved into the file, and that variable is invalid.
Code: Select all
System.ArgumentException: Parameter is not valid.

   at System.Drawing.Image.FromStream(Stream stream, Boolean useEmbeddedColorManagement, Boolean validateImageData)

   at PaintDotNet.Data.PngFileType.OnLoad(Stream input) in D:\src\pdn\src\PaintDotNet\Data\PngFileType.cs:line 118

   at PaintDotNet.FileType.Load(Stream input) in D:\src\pdn\src\Data\FileType.cs:line 496

   at PaintDotNet.Functional.Func.Eval[T1,TRet](Func`2 f, T1 arg1) in D:\src\pdn\src\Base\Functional\Func.cs:line 158
chosenbyfew
 
Posts: 45
Joined: Sat Jul 22, 2017 05:44

Re: Custom House, How To?

PostPosted by Epicmarkvan » Mon Jul 31, 2017 18:04

Not sure how it could be. Like I said in the other post I remade it in GIMP after having made it in paint.net. That should eliminate that as a possibility, I think. I'm far from an expert though.
Image
User avatar
Epicmarkvan
 
Posts: 34
Joined: Tue Sep 15, 2015 05:27
Location: New Hampshire, USA

Re: Custom House, How To?

PostPosted by chosenbyfew » Mon Jul 31, 2017 19:50

Try backing up one of the existing dynasty_X.tga files and then editing it to put your coat of arms over one of the existing ones, then checking in game to see if it worked. Then we can figure out if it's the image or if it's the way the game is being told to read it.
chosenbyfew
 
Posts: 45
Joined: Sat Jul 22, 2017 05:44

Re: Custom House, How To?

PostPosted by Epicmarkvan » Fri Aug 04, 2017 01:16

With the help of chosenbyfew, the other folks in this chat, the dev of Congenital Overhaul(for my use of his mod as a sort of guide to understanding), and of course the devs of the AGOT mod themselves; it has been done! Thank you all for the help! I'm so happy to be able to play as my own dynasty and characters, and with the dynamic_coa I'm not stuck with the title flags for things either. Love you all, so much! If you want a copy of the mod for personal use, or want to take a look at it to see how to do the process yourselves, just post here and I'll send it to you!
Image
User avatar
Epicmarkvan
 
Posts: 34
Joined: Tue Sep 15, 2015 05:27
Location: New Hampshire, USA

Re: Custom House, How To?

PostPosted by arcanum » Mon Sep 04, 2017 13:03

Thank you for this thread. I am currently trying to learn to mod things in the game and am in the process of doing something similar to what is explained in here and it is great using this as a guide..!

Epicmarkvan wrote:With the help of chosenbyfew, the other folks in this chat, the dev of Congenital Overhaul(for my use of his mod as a sort of guide to understanding), and of course the devs of the AGOT mod themselves; it has been done! Thank you all for the help! I'm so happy to be able to play as my own dynasty and characters, and with the dynamic_coa I'm not stuck with the title flags for things either. Love you all, so much! If you want a copy of the mod for personal use, or want to take a look at it to see how to do the process yourselves, just post here and I'll send it to you!


I just wondered, if it is not too cheeky.. can I take you up on this offer and use your mod as a guide for making my own?

Thanks! :D
arcanum
 
Posts: 19
Joined: Fri Aug 19, 2016 13:42
Location: Midi-Pyrenees France

Next

Return to Technical Discussion

Who is online

Users browsing this forum: No registered users and 1 guest