Majesty Gold HD

Majesty Gold HD

Customize Majesty!
Create and upload new Quests and Mods for Majesty HD!
amantalado 1 11 Jun, 2016 @ 3:57pm
Possibility of a Combine Strings Function?
Is it possible to include a function in the game that can take two strings and combine them to a single string?

For example, String1 is set to "Looking for:" and String2 is set to "an Inn", can a function be made to combine the two strings provided into a single string that would then be "Looking for: an Inn" or something to that extent?
< >
Showing 1-3 of 3 comments
Cyberlore Dev  [developer] 1 14 Jun, 2016 @ 8:07pm 
Currently there isn't an easy way to make a string that can be displayed from GPL. The few functions that modify what text is displayed, use either an index into the original string table from the game, or take a string "key" that is used to find a string in the string dictionary for a quest/mod. Either of these look up the string, rather than using a generated string. The original reason for this was to make it easy for translation. Building a string on the fly in code is fraught with peril as languages vary the ordering of subjects as well as throwing gender into the mix. That being said, I can look into modifying the system so that you can make strings to display on the fly and modifying the “intent” and other systems to use them.
amantalado 1 30 Jun, 2016 @ 7:28pm 
It does appear that the game has some basic type of function for String Combination due to the presence of structures with numbered names and Heroes with names that appear strung together in a Prefix/Suffix type format. I'm not sure how flexible that can be, but even access to one or both would be immensely helpful.
amantalado 1 10 Mar, 2018 @ 1:50am 
Originally posted by Cyberlore Dev:
Currently there isn't an easy way to make a string that can be displayed from GPL. The few functions that modify what text is displayed, use either an index into the original string table from the game, or take a string "key" that is used to find a string in the string dictionary for a quest/mod. Either of these look up the string, rather than using a generated string. The original reason for this was to make it easy for translation. Building a string on the fly in code is fraught with peril as languages vary the ordering of subjects as well as throwing gender into the mix. That being said, I can look into modifying the system so that you can make strings to display on the fly and modifying the “intent” and other systems to use them.

Nevermind. The game already has a way to combine them, it just took me a while to realize what it was, the function for combining strings on the fly should no longer be necessary.
< >
Showing 1-3 of 3 comments
Per page: 1530 50