Post by FunkySwerve on May 26, 2011 16:30:13 GMT
Reposted from bioboard pm from Below the Belt, on how to update simtools with new languages. I skimmed it, and it appears roughly correct. At step 4, it's important to make sure that your alphabetization lines up with your switches, if you insert any letters, but other than that, it looks about right. Hope it's of help to someone.
Funky
=============================================
Hey, Funky
No worries. Hope all is well and hope you get another comp soon. We need our Funky!
Anyway, I started getting my hands dirty with the system and was able to update it with my new languages/names as well as customize it for my subrace system and it works perfectly.
So, in the event that someone else contacts you or the boards about how to customize it, I'd thought I'd let you know. It certainly is more complex than just updating a single function, though not as complex as it could be. What I've done is make changes to the functions that impact what the player sees, while the back-end processing/converting of the language remains the same. So, while the player sees that he's speaking in "The vile speech of the void", the system is really processing "Chondathan". But in the end, the player gets an immersive, custom language and the system continues to operate in the same fashion as it was created. As Charlie Sheen would say: "Winning!"
So, here's my 10-step walkthrough:
1) Map it all out. In your system, there are 80+ languages from racial, planar, class, and regional. Before mucking around in the code, map out each of the languages and how your world would use or not use each built-in language. That way, you only change the ones you need to change. Which races get what languages? What subraces? What classes? Factions? etc... having a grid that lists each built-in language (and the corresponding language "number" from 1-89),what you're changing a language to, and the specifics of who gets what language will make customizations much simpler to assign the languages correctly
2) Comment your changes. Make sure that as you make changes, you note what you changed, what it was before you changed it, and where it was located before you changed it. This will make going back in later a lot easier if you need to.
3) fky_chat_inc: GetNameOfLanguage: In this function, replace the names of each of the language you want to change. This is the easiest and a good place to start
4) fky_chat_inc: GetLanguageNumber: This is a cool function that parses the name of the language into alphabetical order. There are 2 potential integer values for nText. The first is racial and there's probably little reason to change these. The second, though, may have to be updated depending on what names you're using. As you'll see, some letters of the alphabet are missing though adding them in is no issue, just add the letter into the list (for example, "w" is missing, but say you want to rename "chondathan" to "warrior code", just insert the "w" as case ). Then, you'll need to add a new switch case that corresponds to the value of that new letter in the substring count (you'll only need to do this if you're adding a new letter to the substring parsing...there's only a few missing letters). Next, go through the list of languages and move/replace renamed languages into their new alphabetical category (in the example prior, the renamed "chondathan" would be moved from the "c" switch case statement to the new "w" switch case statement. Keep the language number the same, just replace the name string.
5) fky_chat_inc: GetsSpeaksRacialPlanarLanguage AND GetsSpeaksRegionalLangauge functions: The way the system is set up, it considers "regional" languages different from "racial/planar" and "class" languages. It is important at this point to evaluate your newly named languages and see how they fit into that structure. If you renamed a "regional" language (e.g. Chondathan) to a racial language (e.g. Fey), then you'll need to move that language from its current location in the GetsSpeaksAtoHRegional language function and put it in the GetsSpeaksEtoHRacialPlanar function. Make sure to update the name of the language, but don't touch the language number.
6) fky_chat_inc: GetsSpeaksAnyRacialPlanarLanguage AND GetsSpeaksAndRegionalLanguage AND GetsSpeaksAnyClassLanguage functions: Reflect any changes to the relocation of languages from/to racial/planar and regional in these lists.
7) fky_chat_config: SubraceSpeaksXXX : You may need to create some additional functions that relate to your specific renamed language if you're using a subrace system and changed some "regional" langauges to racial/planar. If so, they're easy to add, just copy and paste and existing one, update the function name, and add what subraces get the language
8) fky_chat_inc: DoLanguageSetup: Here's where you can assign languages to races and classes, and check to see if a subrace should get a language. Update these to conform to who gets what languages in your world. Make sure that any functions you created in #7 above are reflected in this function too.
9) fky_chat_levelup: Update this list with any renamed class-based languages
10) fky_chat_config: GetLoreNeededToComprehendLanguage: Consider your newly renamed language and the associated lore that would be required to comprehend the langauge. Likely it is different than what it was prior.
One final tip: the system is flexible in that it could use NWNx or an inventory item to manage the system. If you use NWNx and made all your changes to that part of the system, for completeness sake, you should consider making the same changes to the inventory item section as well. It only takes a few extra minutes.
Hope it helps. It may not cover every change that could be possible, but it should get users 90% of the way down the road to updating the system.
Later,
BtB
Funky
=============================================
Hey, Funky
No worries. Hope all is well and hope you get another comp soon. We need our Funky!
Anyway, I started getting my hands dirty with the system and was able to update it with my new languages/names as well as customize it for my subrace system and it works perfectly.
So, in the event that someone else contacts you or the boards about how to customize it, I'd thought I'd let you know. It certainly is more complex than just updating a single function, though not as complex as it could be. What I've done is make changes to the functions that impact what the player sees, while the back-end processing/converting of the language remains the same. So, while the player sees that he's speaking in "The vile speech of the void", the system is really processing "Chondathan". But in the end, the player gets an immersive, custom language and the system continues to operate in the same fashion as it was created. As Charlie Sheen would say: "Winning!"
So, here's my 10-step walkthrough:
1) Map it all out. In your system, there are 80+ languages from racial, planar, class, and regional. Before mucking around in the code, map out each of the languages and how your world would use or not use each built-in language. That way, you only change the ones you need to change. Which races get what languages? What subraces? What classes? Factions? etc... having a grid that lists each built-in language (and the corresponding language "number" from 1-89),what you're changing a language to, and the specifics of who gets what language will make customizations much simpler to assign the languages correctly
2) Comment your changes. Make sure that as you make changes, you note what you changed, what it was before you changed it, and where it was located before you changed it. This will make going back in later a lot easier if you need to.
3) fky_chat_inc: GetNameOfLanguage: In this function, replace the names of each of the language you want to change. This is the easiest and a good place to start
4) fky_chat_inc: GetLanguageNumber: This is a cool function that parses the name of the language into alphabetical order. There are 2 potential integer values for nText. The first is racial and there's probably little reason to change these. The second, though, may have to be updated depending on what names you're using. As you'll see, some letters of the alphabet are missing though adding them in is no issue, just add the letter into the list (for example, "w" is missing, but say you want to rename "chondathan" to "warrior code", just insert the "w" as case ). Then, you'll need to add a new switch case that corresponds to the value of that new letter in the substring count (you'll only need to do this if you're adding a new letter to the substring parsing...there's only a few missing letters). Next, go through the list of languages and move/replace renamed languages into their new alphabetical category (in the example prior, the renamed "chondathan" would be moved from the "c" switch case statement to the new "w" switch case statement. Keep the language number the same, just replace the name string.
5) fky_chat_inc: GetsSpeaksRacialPlanarLanguage AND GetsSpeaksRegionalLangauge functions: The way the system is set up, it considers "regional" languages different from "racial/planar" and "class" languages. It is important at this point to evaluate your newly named languages and see how they fit into that structure. If you renamed a "regional" language (e.g. Chondathan) to a racial language (e.g. Fey), then you'll need to move that language from its current location in the GetsSpeaksAtoHRegional language function and put it in the GetsSpeaksEtoHRacialPlanar function. Make sure to update the name of the language, but don't touch the language number.
6) fky_chat_inc: GetsSpeaksAnyRacialPlanarLanguage AND GetsSpeaksAndRegionalLanguage AND GetsSpeaksAnyClassLanguage functions: Reflect any changes to the relocation of languages from/to racial/planar and regional in these lists.
7) fky_chat_config: SubraceSpeaksXXX : You may need to create some additional functions that relate to your specific renamed language if you're using a subrace system and changed some "regional" langauges to racial/planar. If so, they're easy to add, just copy and paste and existing one, update the function name, and add what subraces get the language
8) fky_chat_inc: DoLanguageSetup: Here's where you can assign languages to races and classes, and check to see if a subrace should get a language. Update these to conform to who gets what languages in your world. Make sure that any functions you created in #7 above are reflected in this function too.
9) fky_chat_levelup: Update this list with any renamed class-based languages
10) fky_chat_config: GetLoreNeededToComprehendLanguage: Consider your newly renamed language and the associated lore that would be required to comprehend the langauge. Likely it is different than what it was prior.
One final tip: the system is flexible in that it could use NWNx or an inventory item to manage the system. If you use NWNx and made all your changes to that part of the system, for completeness sake, you should consider making the same changes to the inventory item section as well. It only takes a few extra minutes.
Hope it helps. It may not cover every change that could be possible, but it should get users 90% of the way down the road to updating the system.
Later,
BtB