Difference between revisions of "Talk:Backgrounds tutorial"

From Dragon Age Toolset Wiki
Jump to: navigation, search
m (oops)
m (And forgot again)
Line 17: Line 17:
 
// ... end nested 'for-loop's
 
// ... end nested 'for-loop's
 
</dascript>
 
</dascript>
 +
 +
--[[User:FollowTheGourd|FollowTheGourd]] 02:44, 29 March 2011 (UTC)
  
 
== Is this correct? ==
 
== Is this correct? ==

Revision as of 03:44, 29 March 2011

Bugfixes and some comments

The crashing because of the background description string ID is actually because of the UI and can be fixed by modders. In the chargen.gfx's ActionScript RaceGenderScene.GrabBackgrounds() static function, the following is what's causing the crash - basically using the StringID as an array index for the sole purpose of checking if that StringID has been seen yet, so this can be worked around to check it some way else - or just drop it if it's not strictly needed. Incidentally, this is probably also why you need unique background description string IDs for each race for them to get properly enumerated.

var aStringCheck = [];
// ...
// ... nested 'for-loop's
       var bBackgroundAllowedByRace = Number(ExternalCommands.Get2DAValueByRowIndexColumnName(_2DA.TABLE_BACKGROUND, nBackgroundRow, RaceGenderScene.m_aRaces[nRaceIndex].sLabel));
       var nDescStringID = Number(ExternalCommands.Get2DAValueByRowIndexColumnName(_2DA.TABLE_BACKGROUND_DESC, nBackgroundRow, RaceGenderScene.m_aRaces[nRaceIndex].sLabel));
       if (bBackgroundAllowedByRace == 1 && aStringCheck[nDescStringID] == null)
       {
                    aStringCheck[nDescStringID] = nDescStringID;
 
       }
// ... end nested 'for-loop's

--FollowTheGourd 02:44, 29 March 2011 (UTC)

Is this correct?

I have problems with this solution. I tried it twice now, once I tried to implement it into my module, the other time I did it exactly as written here. 1. The custom templates for the Backgrounds don't work (The character has no equipment, no matter what background I choose) with the scripts on this tutorial, although the changes work fine if I run RESOURCE_SCRIPT_MODULE_CORE 2. The race choice doesn't change the character (But that could be because the scripts are missing alot, it's not that important for test purposes) 3. The strings for the Background description don't work (Yes I have corrected them in the Toolset, because the ExcelProcessor can't handle that big numbers), they don't show up, when I'm clicking on the Backgrounds.

I have not tested dialouge yet, but am I making something wrong? Or has this tutorial some errors? Nobody123456 13:49, 26 November 2009 (UTC)

I think you might be making some errors (although it is possible that there is some error or ommision in what I wrote). I tested the tutorial by running through it from scratch after I wrote it and my game worked fine. It is a very sensitive process though, so the slightest thing wrong can really throw you out.
The first thing I would suggest is to get the background description strings working because I know that can cause issues if you don't get it right. Try a new module and don't make any changes execpt for adding your own strings to the backgrounds and see if that works. Oh and be sure to export your talk table along with any other resources before you play. Actaully that's probably it - I should add that to the tutorial. Stuntpope 15:01, 26 November 2009 (UTC)
I did export the string table, so that can't be it. I recreated it from scratch, now some equipment choices work, some don't. The race choices now works fine, but the strings still don't show up. I tested the background choices in a dialouge, and this works perfectly fine. I uploaded the module, so if you wanna take a quick look, that would be great. Background Test Module and if you want to install the module as an addin DAZIP format Nobody123456 05:20, 27 November 2009 (UTC)
I notice your talk table is called strings.tlk. That seems strange to me, I didn't know you could rename tlk files but mine is called bg_demo_en-us, where bg_demo is what my module is called. so i would have expected yours to be bdm_2_en-us.tlk if you hadn't renamed it. You say that you are able to display strings in dialogue though so maybe that's not it. Another possibility is that this is another bug in the description strings. Your strings are a good million higher than mine - try using exctly the same string ID range that I used.
As for equipment - I didn't really spend any time looking at what equipment those templates start with. I just selected some that had the look I was going for in chargen, so the ones that are just dressed plainly and don't have weapons or anything are that way becasue that is what those templates are (I think i used those for the servants). To check that this is working go into the toolset and find those templates - compare them to what those characters have if you create them. If you want them to have equipment, simply create a new creature and give them whatever equipment you want, then use that template name in the GDA. Try and resolve your other issue first though before you try that. Stuntpope 07:25, 27 November 2009 (UTC)
It was indeed the table name. It was exportet that way, that's strange, but now the Strings work fine, thank you very much! Nobody123456 07:52, 27 November 2009 (UTC)
I ran into this same problem which is a user error. Make sure you export the "talk table" and NOT "string table". The export "string table" option appears on the export menu if you have the talk table open at the time. Deadrockstar 11:43, 8 December 2009 (UTC)
Great to hear you got it working! Stuntpope 08:14, 27 November 2009 (UTC)

Why are the CHARGEN event scripts customised?

I managed to get my custom background working without customising the CHARGEN event scripts. In fact, I don't remember seeing those scripts, so maybe they were added later? At any rate, now we have a forum query about it. Can anyone explain why that customisation is proposed, and how the code differs from the Bioware script? That would help people to understand which lines they need to change to suit their own scenario. Proleric1 09:41, 7 January 2011 (UTC)