Author Topic: [Code] Custom Banner Module System and Resources  (Read 8741 times)

0 Members and 1 Guest are viewing this topic.

dunde

  • Count
  • *
  • Curious Coder of The Vision
    • View Profile
  • Faction: Swadian
  • WB
[Code] Custom Banner Module System and Resources
« on: November 10, 2011, 04:49:43 PM »
This is modulesystem 1.143 with fully running custom banner

Download Link : MB Repository

Included with this package :
  • module system
  • textures
  • modified custom_banner.brf
  • 1 new custom banner map icon flag and 3 custom banner background theme.

How to put this into your module :
  • copy the dds into your module's folder
  • copy the brf into your module's folder
  • edit your module.ini. Change load_resource = custom_banner to load_mod_resource = custom_banner
  • modify your module system, according this module system from this package. The key word is normal_banner, custom_banner, dunde's begin and dunde's end

Issues :
 - multiplayer 's unsupported yet, you can add the multiplayer support by yourself, it's not hard, but I have no server to test.
 - troop note currently have no banner yet.solved with v1.1 update
 - sometime custom banner presentation don't update it's heraldic, but it's ok on the gameplay.
 
Credit :
 - FALX, original idea
 - dunde, for this package

How to make own made heraldic items works with custom banner :
  • Follow this tutorial to make heraldics items
  • Tableau code template for custom banner is :
Code: [Select]
  ("heraldic_XXX", 0, "sample_heraldic_XXX_banner", 512, 512, 0, 0, 0, 0,
   [
    (store_script_param, ":troop_no", 1),
     
    (set_fixed_point_multiplier, 100),
    #(try_begin),
       #(eq, "$debug_mode", 1),
       #(call_script, "script_draw_banner_to_region", ":troop_no", "$debug1", "$debug2", "$debug3", "$debug4", "$debug5", "$debug6", "$debug7", "$debug8", "$debug9"),
     #(else_try),   
     (call_script, "script_draw_banner_to_region", ":troop_no", 0,0, 5000, 5000, 10000, 10000, 10000, 10000, 0), 
     #(try_end),
     (init_position, pos1),
     (position_set_z, pos1, 100),
     (cur_tableau_add_mesh, "tableau_mesh_heraldic_XXX_banner", pos1, 0, 0),
     (cur_tableau_set_camera_parameters, 0, 200, 200, 0, 100000),
     ]),  
  • Uncomment the commented parts. It's important to tune the parameters. Compile!
  • Test in the game, start as noble so the game will call custom_banner_selection immediately. You can see how the item will looks. Type debug and new overlays will be shown up. They are the parameters $debug1 to $debug9. Set the values until the item looks well. Note the values! PS. you can speed up the up/down parameters change by holding left shift or left ctrl key.
  • Quit game, comment back the commented parts of tableau code, and write down the values you note to this line (replace the paramaters with the values you wrote) :
    (call_script, "script_draw_banner_to_region", ":troop_no", 0,0, 5000, 5000, 10000, 10000, 10000, 10000, 0),
    then recompile your module system.
(click to show/hide)
« Last Edit: December 25, 2011, 11:33:17 PM by dunde »

Slawtering

  • Grandmaster Knight
  • *
    • Steam - http://steamcommunity.com/id/Slawtering/
    • View Profile
  • Faction: Neutral
  • WBNWWF&SM&BVC
Re: Custom Banner Remake - a brainstorming
« Reply #1 on: November 10, 2011, 07:48:11 PM »
Interesting. Any way of adding your own images so you could make a custom banner even more unique.

Computica

  • Grandmaster Knight
  • *
  • "Cosmic Kalypso!"
    • View Profile
  • Faction: Swadian
  • MP nick: Computica
  • M&BWBWF&S
Re: Custom Banner Remake - a brainstorming
« Reply #2 on: November 10, 2011, 10:38:53 PM »
Very Nice.


"The God you don't believe in does not exist"
"No need for bombs, when hate will do."

FALX

  • Master Knight
  • *
  • Wyrd bið ful aræd
    • View Profile
  • Faction: Bandit
Re: Custom Banner Remake - a brainstorming
« Reply #3 on: November 10, 2011, 10:56:27 PM »
Excellent!    :D    This is good news. Thanks to you I felt the scripts in the spring arms.  And now you've done much more interesting. We hope that the script is open source software appears in many versions   to modes.

dunde

  • Count
  • *
  • Curious Coder of The Vision
    • View Profile
  • Faction: Swadian
  • WB
Re: Custom Banner Remake - a brainstorming
« Reply #4 on: November 11, 2011, 05:38:07 AM »
Any way of adding your own images so you could make a custom banner even more unique.
All we need are additional custom_banner_charges.dds and the meshes and then we can easily add them as new charges.

Excellent!    :D    This is good news. Thanks to you I felt the scripts in the spring arms.  And now you've done much more interesting. We hope that the script is open source software appears in many versions   to modes.
Ah, I see we have same interest on custom banner. I remembered that I read something about it but I forgot it where. I think It's your topic I read.
It will goes OSP when it's ready. I'm rewriting the tableau of heraldics items to fits with this custom banner. It should be rewriten because I decided to directly draw the charge to the item's  tabelau instead of put the banner mesh there as native do with standard banner. I don't like my heavy armor have some fabric shades.
2nd trouble is the custom_banner_charges.dds charges is not listed with certain order so it's hard to make like swadian lords will have lion like charges and sarranid lords will have swords or moon charges, so currently I made the lords have random custom banner  :roll:.

Somebody

  • Code Pope
  • Baron
  • *
    • View Profile
  • Faction: Bandit
  • WBWF&S
Re: Custom Banner Remake - a brainstorming
« Reply #5 on: November 11, 2011, 06:59:10 AM »
You should be able to order their entries in module_meshes however you want. Have you tried using create_mesh_overlay_with_item_id to make checking the tableau coordinates easier?

Efe Karacar

  • Duke
  • *
  • aka Belendor
    • Steam - Belendor
    • Twitch.tv - Belendorr
    • YouTube - Belendor
    • View Profile
    • Art of Efe Karacar
  • Faction: Swadian
  • MP nick: Belendor
  • WBWF&SNWVCM&B
Re: Custom Banner Remake - a brainstorming
« Reply #6 on: November 11, 2011, 07:18:36 PM »
I always knew this was hiding out there. Couldn't find the right scripts, though.

dunde

  • Count
  • *
  • Curious Coder of The Vision
    • View Profile
  • Faction: Swadian
  • WB
Re: Custom Banner Remake - a brainstorming
« Reply #7 on: November 12, 2011, 03:03:18 PM »
Have you tried using create_mesh_overlay_with_item_id to make checking the tableau coordinates easier?

Thank you. Never crossed my mind before. I'll try that way. So I think I'll need to make another presentation that having control to change some parameters of item's tableau.

Progress report now. The banner can be drawn into heraldic items (with ugly position right now. I'll fix it later using somebody's method above) for all troops. Tested in the battle and it seems didn't decrease the performance too much.
2 problems now :
- once a map icon's drawn with a specific banner, it can't be altered anymore when we change our banner later.
- I can't find a way yet to put the banner beside the character's picture on troops note tableau.

Slawtering

  • Grandmaster Knight
  • *
    • Steam - http://steamcommunity.com/id/Slawtering/
    • View Profile
  • Faction: Neutral
  • WBNWWF&SM&BVC
Re: Custom Banner Remake - a brainstorming
« Reply #8 on: November 12, 2011, 03:48:07 PM »
I want to know what other "unabled" features there are in warband (and maybe WFaS). Though hoping for a fully functioning autofire might be a bit hopeful.

dunde

  • Count
  • *
  • Curious Coder of The Vision
    • View Profile
  • Faction: Swadian
  • WB
Re: Custom Banner Remake - a brainstorming
« Reply #9 on: November 13, 2011, 01:39:15 PM »
I want to know what other "unabled" features there are in warband (and maybe WFaS). Though hoping for a fully functioning autofire might be a bit hopeful.

No, there is no autofire in WB's native. If there are hidden disabled features, found by some members of TW , are : fintslock pistol (never showed up at native), some old parties like patrols, messengers, etc (commented), collecting debt quest (disabled).

Back to topic, here are 2 screenshot of custom banner on world map and in the battle.
(click to show/hide)

Caba`drin

  • Dovie'andi se tovya sagain
  • Forum Legend
  • *
  • It's time to toss the dice.
    • View Profile
  • Faction: Nord
  • MP nick: Caba_drin
  • WBM&BWF&SNWVC
Re: Custom Banner Remake - a brainstorming
« Reply #10 on: November 13, 2011, 03:02:56 PM »
Excellent. Thanks for doing this Dunde.
Was on my "I should get 'round to it" list...but I haven't yet.



dunde

  • Count
  • *
  • Curious Coder of The Vision
    • View Profile
  • Faction: Swadian
  • WB
Re: Custom Banner Remake - a brainstorming
« Reply #11 on: December 11, 2011, 08:02:07 AM »
It's finished!  :)
The Source Code and resources are on MBRepository now

Efe Karacar

  • Duke
  • *
  • aka Belendor
    • Steam - Belendor
    • Twitch.tv - Belendorr
    • YouTube - Belendor
    • View Profile
    • Art of Efe Karacar
  • Faction: Swadian
  • MP nick: Belendor
  • WBWF&SNWVCM&B
Re: Custom Banner Remake - a brainstorming
« Reply #12 on: December 11, 2011, 08:04:06 AM »
It's finished!  :)
The Source Code and resources are on MBRepository now

Yes! Thanks for that. I was having troubles with presentation screen, texts were messed up with each other, fixed that?

dunde

  • Count
  • *
  • Curious Coder of The Vision
    • View Profile
  • Faction: Swadian
  • WB
Re: Custom Banner Remake - a brainstorming
« Reply #13 on: December 11, 2011, 08:05:40 AM »
It's finished!  :)
The Source Code and resources are on MBRepository now

Yes! Thanks for that. I was having troubles with presentation screen, texts were messed up with each other, fixed that?

The native's presentation is remade from scratch.

The Real Slate

  • Master Knight
  • *
  • When you conquer fear of death, you start to live.
    • Steam - therealslate
    • View Profile
    • Insanity's Finest Discord
  • Faction: Neutral
  • MP nick: Sir Slate
  • M&BWBWF&S
Re: [Code] Custom Banner Module System and Resources
« Reply #14 on: December 14, 2011, 03:29:34 PM »
Oh wow, this has been needed for quite some time now.  I'll have to dig around in this and add a ton more charges and backgrounds always wanted to do that.