assigning a new face to player when start like a king

agi90

Recruit
Best answers
0
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?
 

agi90

Recruit
Best answers
0
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..
 

Eärendil the Mariner

Subforum Moderator
WBWF&SM&B
Best answers
48
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.
 

kalarhan

Python Saint
Count
WBNWVCWF&S
Best answers
31
agi90 said:
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
Best answers
0
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
WBNWVCWF&S
Best answers
31
agi90 said:
“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
Best answers
0
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:
(troop_set_face_keys, "trp_player", 0x000000003608224647633658a455c6d300000000001db30b0000000000000000),
 

agi90

Recruit
Best answers
0
But why? In the header operation it says (trop_set_face, troop_id, string),
 

kalarhan

Python Saint
Count
WBNWVCWF&S
Best answers
31
agi90 said:
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?
 

agi90

Recruit
Best answers
0
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

Duke
M&BWBNWVCWF&S
Best answers
14
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:
(str_store_string, s0, "@000000003608224647633658a455c6d300000000001db30b0000000000000000"),
(troop_set_face_keys, "trp_player", s0, 0),

 

Kentucky James VII

BioAfrikaner
Duke
Best answers
2
agi90 said:
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
Best answers
0
Dj_FRedy said:
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:
(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: