New OSP Ideas - Sceners & Heraldry Artists Still Needed!

Users who are viewing this thread

Lav

Sergeant Knight at Arms
Okay, so what follows is the list for several OSP projects that I have ideas for. However my personal skill set is not optimally suited for them. So while I potentially can do everything listed below, it will take longer and look uglier than it otherwise could. Hence for all the these ideas, either I get help and publish them in the nearest future, or I "keep them in mind" for an indeterminate amount of time and eventually get around to implement them solo - but with no guarantee as to when. :-)

So, without further ado:

Redesigning Heraldry

OSP needs: 2D artist.

To be frank, M&B tableau system is an incredibly versatile mechanism, however it's actual implementation for heraldry leaves a lot to be desired. My primary gripe is with the fact that the entire heraldic system is based on scene prop banners. When applying heraldry on an item, modder is essentially projecting a banner on the item's texture. This has the following major drawbacks:

1. The banner has limited size, which necessitates the use of background color, which must be hand-picked for each and every banner, and mismatched color will make your heraldic items look like ****.
2. Many banners have non-trivial graphics at the edges, especially at the top and the bottom. This imposes additional limits to how these banners (and by extension, absolutely all banners) can be placed on item's mesh. When determining the banner's position on the tableau, it is necessary to avoid any artifacts while still making sure the main part of the image is not too large or too small and positioned roughly at the chest. This is not always possible, sometimes making for quite awkward heraldry positions.
3. Banners have their own texture and shadows which look fine on banner itself. However when combined with item's tableau, banner's texture can only degrade the image quality. If the item has a very detailed texture, the heraldry may already be quite distorted, so adding extra noise is not something we should be happy for. Or the item might be polished enough so that banner's texture is actually discernible - and you definitely do not want a cloth texture to be visible on your plate armor.
4. The entire heraldic system depends on entity ranges too much. For each new banner, you must have a new mesh, a new scene prop, a new map icon flag and a new record in banner color array, and all these entities must have the same relative position to the first game banner. As the result, adding a new banner is a finicky work and in 99% cases will break savegame-compatibility with previous versions of your module.

What would be an ideal (from modder's point of view) heraldic system? It would be the one where to add a new banner, modder must add a new square mesh with his new crest, and then add his new mesh to the mod's list of banners (probably with several parameters determining how that crest should be painted). Map icon banners and scene props must use tableaus to display heraldry, thus eliminating any need to create new versions of them. All game entries (map icons, scene props, items etc) use original clean version of the crest - therefore the only texture and noise imposed on it is by the item itself.

There may be different visions of what a game crest should be composed of. At the moment my personal idea is as follows:

1. Crest itself, as a simple square mesh. Crest image must fit into a square, and all important details should fit in the circle inscribed into said square. Background should be transparent.
2. Associated background color or background texture mesh. As the background should ideally be the same for all heraldic items, it should be a simple repeated pattern.
3. Optionally, additional graphical meshes, for as long as some standard is imposed on all of them. So some crest may have an associated "bottom" decoration, which would be ignored for round shields, but displayed on the lower hem of a tabard or pavise.

Essentially, when generating the heraldic tableau, background is drawn first, then the crest itself and any optional elements are positioned and scaled in a way determined by item's texture, and finally item's tableau texture is applied to provide the necessary "look&feel" and impose item's material and defects.

Additional benefit is the increased control over heraldry positioning - right now horizontal map icon flags look pretty poorly, with the banner image itself turned 90 degrees from the position it's best viewed at. This is the most glaring example, but not the only one.

To accomplish this, the following needs to be done:

1. All game banners need to be remade into clean fit-in-circle-inscribed-in-a-square versions with transparent backgrounds. This is the major part of the job, and not something I'm really suited to.
2. Map icon flags must be "heraldified" (I've already done this in FISH&CHIP).
3. Scene prop banners must be "heraldified" - i.e. replaced with a single heraldry-supporting banner. This is something I've already done and tested.
4. Tableau scripts must be adapted to the new heraldic system. This is a lot of boring fiddling with coordinates to ensure precise positioning of the new heraldry (which will be thrown astray as new crest meshes will obviously have different dimensions than vanilla banner meshes). Luckily, this only needs to be done once per item, and it's nothing I haven't done before. :-)
5. Mission template triggers replacing banner scene props on all scenes need to be removed. Instead, scene prop trigger should determine what heraldry to display. Should be simple enough.

Tableau Portraits

Needed: 3D artist, 2D artist.

While hanging heraldic banners around your castle is fun, hanging your own portraits (or the portraits of your spouse) would be way cooler. Obviously, it is possible with creative use of tableaus, and there are plenty of vanilla examples generating images of characters in various equipment and positions.

What needs to be done:

1. Portraits themselves need to be designed. This includes 3D design work for portait mesh, and 2D artistry (or screenshottery) to create portrait backgrounds (over which the character image will be drawn). To properly draw a tableau-generated portrait, two textures are necessary: one is a standard heraldic tableau (with solid texture for frame and semi-transparent for image part), and another with a fitting background image texture (some interior or scenery shot).
2. Once again, some fiddling with numbers to make character properly posed and positioned on the portrait.
3. Portrait trigger script, which will identify the owner of current location (or just pick some global variables) and use this information with combination of portait's scene prop instance variation numbers to determine whose portrait to draw (and possibly on what background if several background images are available for this portrait mesh).

City Interiors.

Needed: scene editors (tons of them).

There are plenty of doors on city and castle scenes, and only a few of those doors are actually usable. This, I believe, is an oversight, and fixing it could potentially improve the "look&feel" of the game, which is frankly a bit of a bland sandbox.

Okay, so the game focus is not on actual location exploring, but that wouldn't hurt either, right? :-)

So the idea is to go through city and castle scenes and add passages to various dummy doors, leading to some utterly non-consequential locations. There are balconies and other inaccessible areas in castles which look like they could be accessible through some doors - why not make them actually accessible? There are many businesses in towns, not just those started by player - why not let the player actually visit those businesses, even if he won't be able to do much there? Some doors could lead to private houses, which could be designed to have randomized furniture and decorations. Or to local shops selling stuff that is of no consequence to an adventurer/lord. Strip clubs... er, forget I said that. :-)

Anyway, the sky's the limit (and the number of available entry points). Some framework would have to be established to provide support for the extra passages and entry points, some scripting for randomized houses, and some new dialog for various new locations and NPCs, but nothing unmanageable. Best thing is, once the framework is done, actual improvement of cities and castles (and maybe villages as well?) can be done location by location, as time and sceners' imagination permit.

Note that unlike previous two ideas, I can easily do all the preliminary job for this one. However I'm not sure there's going to be enough volunteer support to implement this project, and furthermore, sceners may have some specific demands to the framework and scripts which I cannot predict. So the first stage for this project would be to discuss and design the requirements for the framework, which I would then be able to provide and allow the community work to start.
 
Belendor said:
I could help with 2D department, then we see how it will develop.
That would be great!

This is the current result of my tests:



I used a symbol of some US Army division on solid green background. Apparently I made a mistake by picking a clothing texture that was too clean - as the result, the banner clashes a bit with the dirty and grimy surroundings. Gonna have to find a dirtier one. :-)

And this is how banner creation looks like in GIMP:
heraldry_creation_1.png
heraldry_creation_2.png


heraldry_creation_3a.png
heraldry_creation_3b.png
heraldry_creation_3c.png
First we have a solid background, then we put our crest over it, and finally we apply the tableau material for the item that the heraldry is being applied on. I used three examples: dark thick cloth, wooden planks, and some tightly packed hay (just because I could :-)).

Now what I need is essentially a bunch of crests. Ideally, a bunch of crests based on vanilla Warband banners. This is an example similar to what I need:

crest_example.png


Image size is 256*256 (there's really no need for larger image as for all items I checked the area for the crest is no larger than that, even those with 1024*1024 texture), background is transparent, and it fits a circle. It could be a bit larger, so the crest would actually touch the edges of the image, but that's not critically important.

Now, some of the Warband banners might be easy to convert, but there are many where some artistic thinking will be necessary - and even a few which will have to be created from scratch. On the banner sheet std_banners_a, for example, there are a few banners which have no crest at all - just background. There are plenty of banners which are split into two or more differently colored areas - these cannot be converted to new system directly, so this color split will have to be contained - perhaps within a shield image?

std_banners_a07.png
Further, the last banner on the std_banners_e texture sheet is the prime example of additional decorator at the top. Do we want to preserve such decorations in some way? It is definitely possible, however if you decide to make such decorations, please only do them for a couple of banners at first, as I will have to run some tests to check how they really fit the tableaus.

std_banners_e21.png
So, are you interested? You could start by picking any banner sheet from Warband and converting it, or by creating some fully original crests of your own if you wish. Or both. :-) My personal goal is to have all vanilla banners converted (including the default and kingdom ones), as until it's done, I cannot in good conscience claim that this project is ready for publishing, but if a few extra dozens of original crests make their way into the final project, I won't mind.

One thing to consider though, it would be great if we could have distinct visual styles for different game cultures. Ideally, each culture banners would be designed by a different artist (oh well, sweet dreams). Anyway, what I mean is it would be great if you could design some "cultural heraldry guidelines" before actually starting making banners for whatever culture.

This is what I wrote in my spare time. This is just suggestions and you are free to change whatever you wish:
Swadia. Backgrounds are usually solid colors, crests themselves are in the form of shields. Top/bottom decorations are rare and usually take the form of wreaths or ribbons.
Vaegir. Crests are usually animal-based, there is usually the large image of one animal in the center, all other crest elements are smaller and optional. Crests are generally painted directly over the background, so nearly all backgrounds are solid colors. Decorations are pretty common and usually take the form of abstract ornamental lines.
Nord. Nordic crests have their roots in ship flags, as such they often lack any detailed images, relying instead on bright contrasting colors. A circle split diagonally into red and blue half, for example, would be a proper Nordic crest. Actual images are used, but generally no more than one image in the center of the crest. Backgrounds are often used to "beautify" the banner and compensate for the simplicity of the crest itself, however background colors are mostly muted.
 
Aye,

My Friend And I could help you with the Scene Editing,
I might get some more people on that if I ask arround!
And my friend could probably help you with some of the 2D he can work really great with Gimp.

So on the idea thing.
You want the scene be more explorable like some of the Scene's in brytenwalda?
And some usable doors that opens like in Presistent World mod?

Regards!
ME :D
 
Whiticus said:
Aye,

My Friend And I could help you with the Scene Editing,
I might get some more people on that if I ask arround!
And my friend could probably help you with some of the 2D he can work really great with Gimp.

So on the idea thing.
You want the scene be more explorable like some of the Scene's in brytenwalda?
And some usable doors that opens like in Presistent World mod?

Regards!
ME :D
Frankly, I'm not sure as I haven't played either mod. :-)

Probably. :-)

What I want to achieve is approximately this:

Descriptions of gameplay follow. What is stricken out is the current user experience in vanilla Warband. What is written in blue is what I want to get instead.
Story 1 said:
Player Bob enters a new town and walks the streets. He decides to explore one of many doors but quickly discovers they are all fake and enters a small town house. A local housewife looks at him fearfully and politely asks him to leave as he's scaring the children.
Story 2 said:
Player Bob continues his exploration of town. Seeing a huge warehouse-like structure, he attempts to enter but unfortunately this structure is as fake as everything else and finds himself in one of town's many enterprises. Several men are working, and are not to be disturbed. Manager, however, is more open for communication and might even give player a new quest.
Story 3 said:
Player Bob doesn't want to deal with those stuffy nobles. He would however like to purchase a house in the town. Finding the local elder he finds no such option in the dialog he manages to obtain the deed for a small house near the town gates. Unfortunately, his new house is woefully underdecorated - nothing more than a cot and a chest are available. Sighing in defeat, Bob returns to the elder and prepares himself to spend twice as much as he already spent to turn his home into something really usable.
Story 4 said:
Player Bob visits the castle of a local lord. Looking up, he can see a nice balcony, and it seems like this door below the balcony should allow him to visit it. He tries to enter it but of course it's fake and indeed finds himself on the balcony overlooking the court.
 
Lav said:
I used a symbol of some US Army division on solid green background. Apparently I made a mistake by picking a clothing texture that was too clean - as the result, the banner clashes a bit with the dirty and grimy surroundings. Gonna have to find a dirtier one. :-)
Okay, I re-mapped the texture and used a more grainy fabric. Maybe (hopefully) someone will later do a better job, but this should be enough for development and testing purposes.



What still needs to be done:

1. Adapt map icons to new heraldry system.
2. Adapt heraldic items (both vanilla and FISH&CHIP) to new heraldry system.
3. Implement game heraldic registry storage (troop to use as data array, scripts to add heraldry to the list, to claim one heraldry from the list, to retrieve all unclaimed heraldry etc). Essentially everything necessary to re-implement the banner selection presentation.
4. Adapt Native scripts and presentations to the new system. Including:
  4.1. Trigger on spr_banner_a to correctly initialize heraldry in singleplayer and multiplayer.
  4.2. Trigger on spr_banner_bi to correctly initialize heraldry in multiplayer.
5. Cross the fingers and wait for artists to make new heraldry. :-)
 
Whiticus said:
Those are some nasty good stories.

Iam in for helping!
We'll need to design some framework first though. So you would know what you can and cannot use on the scene, and a few things that you must use. Give me some time, please. :-) In the meantime, if you could make a single small interior scene with a couple entry points and a passage leading out, that would be a start. Do not invest too much into this scene though, as it will probably be re-made more than once during the initial tests.

UPDATE. Okay, so my very rough and preliminary thoughts on housing framework are as follows:

1. For the start we dedicate a total of 3 new entries in "mnu_town" to the new housing system (this may be easily expanded later). Each entry matches a certain specific scene and a template for it's use. Each town maintains it's own set of associated interior scenes (some scenes will be unique, others may be shared between towns). Entries themselves will be hidden in the "mnu_town" as we'll only use them for scene passages.
2. First of those entries will be a house that the player may purchase from the guildmaster. I want it to be customizable to a certain degree. This means some complicated dialogs with guildmaster and even more complicated mission template triggers to initialize the house. Most items within this scene will be just "templates", to be replaced by the ones that the player actually purchased at the time of scene loading.
3. Second of those entries will be a local enterprise. The most prevalent enterprise in town will be used to select the actual interior, and the interiors themselves are already available in vanilla, though the visitors and dialog on them will need to be changed.
4. Third of those entries will be a local town house. This one is more interesting - I want the town house to be randomized, but to remain the same for each specific entry, even if several entries lead to the same interior scene. This means that:
  4.1. Just as player's house, many decorations in local house will actually be templates, to be replaced by whatever random stuff gets selected for this house instance.
  4.2. To actually differentiate between different houses re-using the same interior scene, the player will arrive to the scene via different entry points. All of those entry points will still be located near the door, there will just be a whole bunch of them.

So let's suppose we have a house interior that we want to use as a local house. We place, let's say, 16 entry points at the door (numbered 0 to 15) - these will be the ones player might arrive to. On the town center scene, we create two new passages which will use the town menu entry for local house, but will have different entry point IDs.

When player activates one of these passages, our "mnu_town" entry for local house gets activated, retrieves the scene used for house interior from the town's slots and sends the player to it. Player arrives to our interior scene at the entry point defined by the passage he used. At this point we can detect the entry point that the player spawned on, and use it's number to properly randomize the house interior, replacing and/or removing scene props appropriately and spawning any necessary NPCs.

If the player is using the second passage, everything remains the same but the entry point number that the player arrives to is different. As the result, randomization of the house interior yields different results and the player arrives to what looks like a different house.

Once this system works, it is quite easy to expand it, adding new entries and associated interiors to the "mnu_town". My personal objective is to make it possible for a town to have 1 player house, 2 enterprises (two different most prevalent in this town), and 4 to 5 different house interiors (so the scene editor would be able to better match them to actual houses on the streets). Other mission types can be added as well (interior of the town guard? local shops? bars? brothels? public baths?) once the basic infrastructure is tested and working.

Ideas, suggestions, critique?
 
Status update for Heraldry:

1. Adapt banner scene props to new heraldry system. DONE.
2. Implement game heraldic registry storage (troop to use as data array, scripts to add heraldry to the list, to claim one heraldry from the list, to retrieve all unclaimed heraldry etc). Essentially everything necessary to re-implement the banner selection presentation. DONE.
3. Adapt map icon tableaus to new heraldry system. DONE.
4. Adapt heraldic item tableaus (both vanilla and FISH&CHIP) to new heraldry system. IN PROGRESS.
5. Adapt Native scripts and presentations to the new system. PLANNED.
6. Cross the fingers and wait for artists to make new heraldry. IN PROGRESS. :-)

Actual code not included yet as it's under testing and may change.
Code:
slot_heraldry_list_start   = 64 # First 64 slots are reserved for other values
                                # Slots 00..49 contain total number of FREE crests of each type
slot_heraldry_total_crests = 50 # Slot 50 contains total number of ALL crests

heraldic_culture_swadia   = 0x0000000000001 # 2 ^ 0
heraldic_culture_vaegir   = 0x0000000000002 # 2 ^ 1
heraldic_culture_khergit  = 0x0000000000004 # 2 ^ 2
heraldic_culture_nord     = 0x0000000000008 # 2 ^ 3
heraldic_culture_rhodok   = 0x0000000000010 # 2 ^ 4
heraldic_culture_sarranid = 0x0000000000020 # 2 ^ 5

generic_heraldry  = 0x1000000000000 # 2 ^ 48
reusable_heraldry = 0x2000000000000 # 2 ^ 49
Code:
# script_crest_register
# Registers a new heraldic crest in the game
# Input:
#   <arg1> = culture mask for new crest (what game cultures it's compatible with).
#   <arg2> = crest mesh (a square mesh with 256*256 texture with actual crest and transparent background).
#   <arg3> = background color (what color will be used to paint the heraldic item/banner/flag).
#   <arg4> = background mesh small (a square mesh with 512*512 texture with some repeated pattern). Use -1 to indicate no bg texture.
#   <arg5> = background mesh large (same, but 1024*1024 texture). If -1 is passed, will default to small BG mesh
#   <arg6> = top decoration mesh (a rectangular mesh 512*64 texture used to decorate the top of heraldic item/banner/flag). Use -1 to indicate no decoration.
#   <arg7> = bottom decoration mesh (a rectangular mesh 512*64 texture used to decorate the bottom of heraldic item/banner/flag). Use -1 to indicate no decoration.
("register_crest", []),

# script_crest_info
# Retrieves all information required to draw the heraldic crest by it's numeric ID
# Input:
#   <arg1> = crest ID
# Output:
#   reg0 = crest mesh
#   reg1 = background color
#   reg2 = background mesh (low resolution)
#   reg3 = background mesh (high resolution)
#   reg4 = top decoration mesh
#   reg5 = bottom decoration mesh
# On failure:
#   reg0 = -1
("crest_info", []),

# script_cf_claim_crest
# Marks the crest with specified crest ID as claimed.
# Input:
#   <arg1> = crest ID to be claimed
# Output:
#   none
# Fails when requested crest is already claimed or does not exist
("cf_claim_crest", []),

# script_count_free_crests_for_culture
# Return the number of unclaimed crests for the specified culture
# Input:
#   <arg1> = heraldic culture
# Output:
#   reg0 = total number of free crests
("count_free_crests_for_culture", []),

# script_count_free_crests_for_culture_mask
# Return the number of unclaimed crests matching the specified culture mask
# Input:
#   <arg1> = heraldic culture mask
# Output:
#   reg0 = total number of free crests
("count_free_crests_for_culture_mask", []),

# script_cf_find_crest_for_culture
# Retrieves crest ID for Nth free crest of specified culture
# Input:
#   <arg1> = heraldic culture: numeric value in 0..47 range OR generic_heraldry OR reusable_heraldry
#   <arg2> = crest sequential index within this culture
# Output:
#   reg0 = crest ID
# Fails when heraldic culture has less free crests than the index requested
("cf_find_free_crest_for_culture", []),

# script_cf_find_crest_for_culture_mask
# Retrieves crest ID for Nth free crest matching the specified culture mask
# Input:
#   <arg1> = heraldic culture mask
#   <arg2> = crest sequential index
# Output:
#   reg0 = crest ID
# Fails when heraldic culture has less free crests than the index requested
("cf_find_free_crest_for_culture_mask", []),

# script_cf_find_random_free_crest_for_culture
# Return crest ID for a random unclaimed crest belonging to the specified culture
# Input:
#   <arg1> = heraldic culture
# Output:
#   reg0 = crest ID
# Fails when there are no crests remaining for the specified culture
("cf_find_random_free_crest_for_culture", []),

# script_cf_find_random_free_crest_for_culture_mask
# Return crest ID for a random unclaimed crest matching the specified culture mask
# Input:
#   <arg1> = heraldic culture mask
# Output:
#   reg0 = crest ID
# Fails when there are no crests remaining matching the mask
("cf_find_random_free_crest_for_culture_mask", []),
 
Weird stuff. Apparently, if I'm using a tableau material which is calling a script to draw the tableau, everything is fine. However if that script is calling another script to calculate some values first, tableau fails to initialize properly when starting or loading the game. Changing the banner and forcing the tableau to re-generate the image fixes the problem, but every time I load the game I still start with a partially completed tableau.

Code is the same, the only difference is that parameter retrieval script was loading the values into registers, while it's code transferred into parent script is operating with local variables.

Is there some kind of call depth limit in Warband in regards to tableaus?

Anyway, top and bottom decorations officially work, even if only on vertical map flag so far, but it's the thought that matters. :-)

1oxe13.jpg


On the image we can see a flag filled with background texture, with top and bottom decorators. I didn't waste too much time making them so they are both essentially just strips of white color. If we squint hard enough we can also see the debugging crest in the center. I designed it specifically for easier positioning - it's essentially a red aiming reticule and unfortunately not easily noticeable on the textured background - I'm using it with solid gray background mostly, where it's not a problem.
 
Status update for Heraldry:

4. Adapt heraldic item tableaus (both vanilla and FISH&CHIP) to new heraldry system. NATIVE DONE, FISH&CHIP IN PROGRESS.
5. Adapt Native scripts and presentations to the new system. RESEARCH PHASE.

Okay, so all Native shields and armors are converted at the minimum level (background + crest, but without decorators). Positioning decorators will be a separate project.

On a parallel note, I have done some research into game heraldry-related scripts as I've been suddenly hit with a panic attack and thought for a moment that there's going to be a major block with multiplayer heraldry. Luckily this is not the case.

I kindly remind to everyone that this project still needs 2D artists.

It's your chance to participate in a project aimed to redefine the game heraldry, so apply now and in droves! :-)
 
I'm still rolling the Interiors project around in my head. As it involves scene editing, it must be as compatible as possible, not just with Native, but with most major mods that use Native scenes, which is a slightly bigger challenge. :-)
 
Okay, all Native and FISH&CHIP items are converted to new heraldry system. There's an additional task remaining to attach decorations to all of them, but primary job is done.

This is how it currently looks in-game (solid blue background, texture with grayish and transparent squares, US army division symbol):

2dmfbc6.jpg


Now I only need the crests themselves. :?
 
Somebody said:
You can grab a bunch of crests from
Code:
custom_banner_charges.dds
- those are the ones found in Native.
And now I feel like an idiot for not thinking that myself. Especially since I'm the one who's neck-deep in custom banner modding... :roll:

Thanks, that should be enough for a few first attempts! :-)
 
Okay, I tried using some templates from the custom_charges.dds texture. They are not really crests - just components for one, but should provide some basic look and feel.

Left to right: four different "crests" with same background texture (white/transparent squares) and varying background color (faded green and faded blue), and the default fallback texture with diagonal white/transparent stripes and blue background color.
mb2.jpg
mb3.jpg
mb4.jpg
mb5.jpg
mb8.jpg
And this is the map flag:

mb6.jpg

What can I say?

1. Horizontal lion doesn't qualify as a full crest, looks too squashed from up and down.
2. Crest textures really shouldn't use DXT5. DXT1 compression will provide sharper edges and better contrast.
3. But even that is an unsufficient measure as these images simply need some back. Perhaps a shield plaque, or something. Otherwise background texture interferes too much.
4. Matching colors by their hex codes doesn't actually work, I really should have picked the colors in graphical editor first. :-)
5. For background, sharp colors are unadvised or they draw the attention away from the crest itself, which is not desired, so I replaced them with more muted ones. Wow, I distinctly remember being taught about this in arts lessons in school - who could have thought they were right all along? ;-)

And this is how crest assignment looks in code. I currently use a different slot to prevent conflicts with Native, but the meaning is the same. Except slot_hero_heraldic_crest points not to some actual entity, but is just the sequential number of the selected crest in the game's list of registered crests.

Code:
    (try_begin),
        (call_script, "script_cf_find_random_free_crest_for_culture", heraldic_culture_swadia),
        (call_script, "script_cf_claim_crest", reg0),
        (troop_set_slot, "trp_player", slot_hero_heraldic_crest, reg0),
    (else_try),
        (call_script, "script_cf_find_random_free_crest_for_culture", generic_heraldry),
        (call_script, "script_cf_claim_crest", reg0),
        (troop_set_slot, "trp_player", slot_hero_heraldic_crest, reg0),
    (else_try),
        (call_script, "script_cf_find_random_free_crest_for_culture", reusable_heraldry),
        #(call_script, "script_cf_claim_crest", reg0), # disabled as reusable heraldry doesn't get claimed anyway
        (troop_set_slot, "trp_player", slot_hero_heraldic_crest, reg0),
    (else_try),
        (troop_set_slot, "trp_player", slot_hero_heraldic_crest, -1),
    (try_end),
Code currently supports up to 30 different heraldic cultures, plus predefined generic_heraldry (which is actually just a regular heraldic culture) and reusable_heraldry (which actually does receive special treatment). Game maintains the International Heraldic Registry, and new crests may get registered there and claimed as necessary. It is perfectly possible to create a crest which will be shared by two or more heraldic cultures, or request a crest by a culture mask.

And this is how crests are registered:
Code:
    ("initialize_heraldry",
        [
            #(call_script, "script_register_crest", culture_mask, crest_mesh, bg_color, bg_tex_lowres, bg_tex_hires, decorator_top, decorator_bottom),
            (call_script, "script_register_crest", reusable_heraldry, -1, 0xFF303090, "mesh_camo_texture_white_strips_diagonal", -1, -1, -1),
            (call_script, "script_register_crest", reusable_heraldry, -1, 0xFF303090, "mesh_camo_texture_white_strips_vertical", -1, -1, -1),
            (call_script, "script_register_crest", heraldic_culture_swadia, "mesh_crest_00_01", 0xFF303090, "mesh_camo_texture_white_squares", -1, -1, -1),
            (call_script, "script_register_crest", heraldic_culture_swadia, "mesh_crest_00_02", 0xFF309030, "mesh_camo_texture_white_squares", -1, -1, -1),
            (call_script, "script_register_crest", heraldic_culture_swadia, "mesh_crest_00_03", 0xFF303090, "mesh_camo_texture_white_squares", -1, -1, -1),
            (call_script, "script_register_crest", heraldic_culture_swadia, "mesh_crest_00_04", 0xFF309030, "mesh_camo_texture_white_squares", -1, -1, -1),
            (call_script, "script_register_crest", heraldic_culture_swadia, "mesh_crest_00_05", 0xFF303090, "mesh_camo_texture_white_squares", -1, -1, -1),
            (call_script, "script_register_crest", heraldic_culture_swadia, "mesh_crest_00_06", 0xFF309030, "mesh_camo_texture_white_squares", -1, -1, -1),
            (call_script, "script_register_crest", heraldic_culture_swadia, "mesh_crest_00_07", 0xFF303090, "mesh_camo_texture_white_squares", -1, -1, -1),
            (call_script, "script_register_crest", heraldic_culture_swadia, "mesh_crest_00_08", 0xFF309030, "mesh_camo_texture_white_squares", -1, -1, -1),
            (call_script, "script_register_crest", heraldic_culture_swadia, "mesh_crest_00_09", 0xFF303090, "mesh_camo_texture_white_squares", -1, -1, -1),
            (call_script, "script_register_crest", heraldic_culture_swadia, "mesh_crest_00_10", 0xFF309030, "mesh_camo_texture_white_squares", -1, -1, -1),
            (call_script, "script_register_crest", heraldic_culture_swadia, "mesh_crest_00_11", 0xFF303090, "mesh_camo_texture_white_squares", -1, -1, -1),
            (call_script, "script_register_crest", heraldic_culture_swadia, "mesh_crest_00_12", 0xFF309030, "mesh_camo_texture_white_squares", -1, -1, -1),
            (call_script, "script_register_crest", heraldic_culture_swadia, "mesh_crest_00_13", 0xFF303090, "mesh_camo_texture_white_squares", -1, -1, -1),
            (call_script, "script_register_crest", heraldic_culture_swadia, "mesh_crest_00_14", 0xFF309030, "mesh_camo_texture_white_squares", -1, -1, -1),
            (call_script, "script_register_crest", heraldic_culture_swadia, "mesh_crest_00_15", 0xFF303090, "mesh_camo_texture_white_squares", -1, -1, -1),
            (call_script, "script_register_crest", heraldic_culture_swadia, "mesh_crest_00_16", 0xFF309030, "mesh_camo_texture_white_squares", -1, -1, -1),
        ]
    ),

P. S. And I'm officially taking a pause until Monday as I'll be away from computers and civilized life in general. :-)
 
Back
Top Bottom