|
Post by thebeardedone on May 21, 2024 17:13:30 GMT -5
I'm working on a pretty basic mod, being my first one. It's simply an extension of the "shortcuts" mod by various others but I'm trying to take all the hard-coded strings and put them into a string table. So far it's all worked as expected, except for one string. For some commands I'm outputting as notifications rather than just outputting to the cheat console.
This is the string in my STBL file (one of numerous variations I've tried):
"{0.SimFirstName} is a {0.String} {1.String} and is a member of the {2.String} household. {M0.He}{F0.She} has lived {0.Number} days of {1.Number} in this life stage and has {2.Number} days left to go. {M1.His}{F1.Her} mood is {3.String}" Which I'm accessing with this in my code to show a notification. The values here are hard-coded for testing but are normally variables:
_create_localized_string(0xC3D52341, sim, 'female', 'teen', 'Miura', 8, 10, 2, 'happy') What it should show is:
"Melinda is a female teen and is a member of the Miura household. She has lived 8 days of 10 in this life stage and has 2 days left to go. Her mood is happy" The output that appears in the notification is:
"Melinda is a female and is a member of the teen household. She has lived days of in this life stage and has days left to go. mood is Miura" As you can see, it's skipping over some of the {x.String} placeholders and all of the {x.Number} placeholders.
Can anyone offer any enlightenment as to why I'm not getting the expected result? Please.
|
|
|
Post by thebeardedone on May 27, 2024 4:18:51 GMT -5
Finally, I worked out what was wrong. The string definition I used in the end, after a great many other variations, is this:
"{0.SimFirstName} is a {1.String} {2.String} and is a member of the {3.String} household. {M0.He}{F0.She} has lived {4.Number} days of {5.Number} in this life stage and has {6.Number} days left to go. {M0.His}{F0.Her} mood is {7.String}"
Have precious little to go on, and pretty much zero documentation, I had originally assumed that the numbering of the placeholder tags would start from zero for each different type (sim, string, number, etc.). I should have remembered the old adage that assumption is the mother of all stuff-ups.
For the benefit of anyone reading this in the hopes of solving the same, or similar, issue, I'll just point out that the numbering of the final version is sequential, regardless of type. The only exception is where the placeholder refers to a sim. Presumably the same would apply to other game entities, such as animals and objects.
|
|