Author Topic: assigning a new face to player when start like a king  (Read 241 times)

0 Members and 1 Guest are viewing this topic.

agi90

  • Recruit
  • *
    • View Profile
  • Faction: Neutral
assigning a new face to player when start like a king
« on: October 11, 2019, 06:45:05 PM »
I would like to find a way to assign a new face by default in the character creation to the player when he starts like a king. Any idea?
« Last Edit: October 11, 2019, 07:01:51 PM by agi90 »

agi90

  • Recruit
  • *
    • View Profile
  • Faction: Neutral
Re: assigning a new face to player when start like a king
« Reply #1 on: October 15, 2019, 09:32:19 PM »
Nobody can help me?
I tried many ways but I really don’t know how to “transfer” the face string into a script in the script file. It just doesn’t work and I tried with several parts, like set_face troop or similar..

[Bcw]Btm_Earendil

  • Baron
  • *
    • View Profile
  • Faction: Neutral
  • WBWF&SM&B
Re: assigning a new face to player when start like a king
« Reply #2 on: October 15, 2019, 09:40:55 PM »
I think the face-code gets always overwritten by the one the player has selected himself. You would need to create some kind of face helmet to force the player to have a specific face and that one is also only suitable if your player is not supposed to change his helmet and you restrict that.
To stay with the set_face stuff, you would need to edit the spawn scripts all since you would need to let a bot spawn with the respective facecode (and equipment) and then the player takes controll of that bot.

At both I can't help you, it's only what I got in mind at the moment what the ways might be.
"If we hit that bullseye, the rest of the dominoes will fall like a house of cards. Checkmate."

- Zapp Brannigan, When Aliens Attack

kalarhan

  • Python Saint
  • Count
  • *
  • Use Q&A thread, not a PM :)
    • View Profile
  • Faction: Neutral
  • WBNWVCWF&S
Re: assigning a new face to player when start like a king
« Reply #3 on: October 15, 2019, 11:08:55 PM »
I would like to find a way to assign a new face by default in the character creation to the player when he starts like a king. Any idea?

check the operations used for face code and use it when you choose the option to be king (menu or presentation). You will also need to force it via a trigger in case players change the face later (as they can at any time). Or you can mess with the interface and disable that feature.

agi90

  • Recruit
  • *
    • View Profile
  • Faction: Neutral
Re: assigning a new face to player when start like a king
« Reply #4 on: October 16, 2019, 10:48:12 AM »
The idea was to have a different face/age in the character creation if the player starts as a king. But the player should still be allowed to change it.
My problem is that I am not being able to “overwrite” the custom face it appears in the character creation at the start of the game

kalarhan

  • Python Saint
  • Count
  • *
  • Use Q&A thread, not a PM :)
    • View Profile
  • Faction: Neutral
  • WBNWVCWF&S
Re: assigning a new face to player when start like a king
« Reply #5 on: October 16, 2019, 01:10:41 PM »
“overwrite” the custom face it appears in the character creation at the start of the game

try changing it between the event {select to be king} and {open character UI}

agi90

  • Recruit
  • *
    • View Profile
  • Faction: Neutral
Re: assigning a new face to player when start like a king
« Reply #6 on: October 17, 2019, 07:16:05 PM »
I tried to add this at the end of the script which makes the player to start as a king, but it just has the effect to set all the paramater (chin, eyes...) at the left of the scroll bar, without changing face or adding beard or anything
Code: [Select]
(troop_set_face_keys, "trp_player", 0x000000003608224647633658a455c6d300000000001db30b0000000000000000),

kalarhan

  • Python Saint
  • Count
  • *
  • Use Q&A thread, not a PM :)
    • View Profile
  • Faction: Neutral
  • WBNWVCWF&S
Re: assigning a new face to player when start like a king
« Reply #7 on: October 17, 2019, 07:50:19 PM »
that is not how you use the operation. See header_operations.py for details.

agi90

  • Recruit
  • *
    • View Profile
  • Faction: Neutral
Re: assigning a new face to player when start like a king
« Reply #8 on: October 17, 2019, 07:54:33 PM »
But why? In the header operation it says (trop_set_face, troop_id, string),

kalarhan

  • Python Saint
  • Count
  • *
  • Use Q&A thread, not a PM :)
    • View Profile
  • Faction: Neutral
  • WBNWVCWF&S
Re: assigning a new face to player when start like a king
« Reply #9 on: October 17, 2019, 07:58:42 PM »
But why? In the header operation it says (trop_set_face, troop_id, string),

nope, it says string_no, not string, and you gave a number which is neither of those things?

[Bcw]Btm_Earendil

  • Baron
  • *
    • View Profile
  • Faction: Neutral
  • WBWF&SM&B
Re: assigning a new face to player when start like a king
« Reply #10 on: October 17, 2019, 08:01:13 PM »
Have a read here too in case you haven't yet: https://forums.taleworlds.com/index.php/topic,142422.0.html
"If we hit that bullseye, the rest of the dominoes will fall like a house of cards. Checkmate."

- Zapp Brannigan, When Aliens Attack

agi90

  • Recruit
  • *
    • View Profile
  • Faction: Neutral
Re: assigning a new face to player when start like a king
« Reply #11 on: October 17, 2019, 08:58:22 PM »
I thought the face code in module troop could work... sorry people, I have read that post on an introduction to module system, but sometimes thing are just so complicated to me...

With string_no what does it mean exactly? In the module string there is nothing related to character creation

Dj_FRedy

  • Count
  • *
  • "game_start"
    • View Profile
  • Faction: Swadian
  • M&BWBNWVCWF&S
Re: assigning a new face to player when start like a king
« Reply #12 on: October 18, 2019, 12:21:05 AM »
Hi @agi90,
The operation is asking for a string, not a hexadecimal number, in this case a previously stored string.

"Strings - s# - are specific 'registers' used to hold a string, rather than an integer. Strings not declared in module_strings (quick strings) begin with the @ symbol. In header_common strings s0 to s67 are declared."

'string_no' refers to this type of strings, s0,s1,s2...s67.
In the ModSys system we have an operation to store strings, 'str_store_string'
You can store the code of the face by omitting '0x' and set it this way:
Code: [Select]
(str_store_string, s0, "@000000003608224647633658a455c6d300000000001db30b0000000000000000"),
(troop_set_face_keys, "trp_player", s0, 0),


"Lately I have had little time to play. That is the downside of modding. And once you get behind the scenes (no pun intended) some of the magic disappears. You start contemplating ways to change the game instead of just playing and having fun. Suddenly it is more fun modding than actually playing".
Adorno

NUQAR'S Kentucky "Nuqar" James XXL

  • BioAfrikaner
  • Duke
  • *
  • 🖕IF YOUR EASILY OFFENDED...GROW SOME BALLS...!!🖕
    • Twitter - yaqobhyndes
    • View Profile
    • Artwork Gallery
  • Faction: Khergit
Re: assigning a new face to player when start like a king
« Reply #13 on: October 18, 2019, 07:46:29 AM »
In the module string there is nothing related to character creation

There are a lot of core features which are not exposed to the module system, and this is seemingly at random, so if you can't find a certain feature that's why.

agi90

  • Recruit
  • *
    • View Profile
  • Faction: Neutral
Re: assigning a new face to player when start like a king
« Reply #14 on: October 18, 2019, 09:14:47 AM »
Hi @agi90,
The operation is asking for a string, not a hexadecimal number, in this case a previously stored string.

"Strings - s# - are specific 'registers' used to hold a string, rather than an integer. Strings not declared in module_strings (quick strings) begin with the @ symbol. In header_common strings s0 to s67 are declared."

'string_no' refers to this type of strings, s0,s1,s2...s67.
In the ModSys system we have an operation to store strings, 'str_store_string'
You can store the code of the face by omitting '0x' and set it this way:
Code: [Select]
(str_store_string, s0, "@000000003608224647633658a455c6d300000000001db30b0000000000000000"),
(troop_set_face_keys, "trp_player", s0, 0),

Oh Dj_FRedy, thank you so much! I should make a statue of you!
Thanks to everybody who helped me here  :party: :party: