I have managed to separate out the new class creation process away from the core scripts and I have it working except for one detail -> there are problems with the default character model.
1. It is not displayed during chargen
2. The defaults for names are not filled in and I cannot do any physical alterations (since the model is not visible)
3. If I ignore all this and continue on, in-game the model is the default human model but in my inventory screen, it shows the default model I assigned in backgrounds_default and also has the correct items.
I have enabled logging and I can see that the correct template string is read and the items are loaded on to the character (as verified by checking the inventory in-game).
My question is - what could be the possible reasons why the character model isn't available during chargen? I suspect everything else is tied to this.
NOTE: All other race-class-background combinations other than the new one work correctly.
I have checked and re-checked all my 2DAs and scripts and everything appears to be correct. After struggling for more than a day with this, I am just hoping someone would have an idea of what I am missing. If needed, I can paste the code here or send a b2b file by email if someone wants to take a look and see if I have done anything wrong.
A short summary of what I did -
- extended following worksheets using m2das - cla_base, guitypes, backgrounds, background_defaults, chargen_preload, abi_base, m2da_base
- created a new worksheet for new class' abilities
- overrode certain functions from sys_chargen_h and have a modified version of a couple of chargen events in my custom chargen scripts.
If I get this working, I will update the wiki with a detailed tutorial -> the current one modifies core scripts which is not a recommended approach, I believe.
Thanks!
Creating New class Problem - Help!
Débuté par
TimelordDC
, déc. 22 2009 04:17
#1
Posté 22 décembre 2009 - 04:17
#2
Posté 22 décembre 2009 - 10:05
Could you PM me here, as I am seeing the same thing; I'd like to see what you've done so far as it seems to be along the same lines as what I was attempting.
#3
Posté 22 décembre 2009 - 10:48
May I see the files you have? I'd like to try as well.
orgo.loveATyahoo.com
orgo.loveATyahoo.com
#4
Posté 22 décembre 2009 - 10:54
Files sent to both LadyD and orgo.love. Thanks, guys, for helping out.
#5
Posté 23 décembre 2009 - 01:56
First, awesome idea for a mod.
Second, I can't find anything obviously wrong with them. I'll have to dig further.
Second, I can't find anything obviously wrong with them. I'll have to dig further.
#6
Posté 23 décembre 2009 - 01:54
You might want to speak with stuntpope as well, I know he was working on a similar thing (he's the one who made the new background tutorial on the wiki without touching core resources).
#7
Posté 23 décembre 2009 - 11:27
Weird. I even tried copying the exact changes you made, but I still got the same problem... I'm not sure...
Can someone else help us?
#8
Posté 23 décembre 2009 - 11:36
I'm trying something that might fix this, but I haven't tested it yet.
#9
Posté 24 décembre 2009 - 02:27
One idea I had was that the game engine uses the formula I overrode to fetch the model.
In detail...
The inventory items are decided by the character template specified in the background_defaults. Since the current formula (nRace*1000 + nclass*100 + nBackground) will not guarantee a unique ID unless I use a high number (multiples of 100) and the CLA_ 2da reading is sequential at the moment (which means class ID has to be 26 - unless changing all class IDs; this is a bug and Georg is aware of it), the current formula cannot work.
So, I overrode the formula to return (nRace*1000 + nBackground*100 + nclass) instead. This works for getting the correct inventory.
However, I suspect the engine uses the original formula to determine the model to use. In this case, it is not finding a character template since the original formula returns 5604 and this value cannot be parsed correctly since the race value (5) indicates no race.
Other than this, I have no other idea.
In detail...
The inventory items are decided by the character template specified in the background_defaults. Since the current formula (nRace*1000 + nclass*100 + nBackground) will not guarantee a unique ID unless I use a high number (multiples of 100) and the CLA_ 2da reading is sequential at the moment (which means class ID has to be 26 - unless changing all class IDs; this is a bug and Georg is aware of it), the current formula cannot work.
So, I overrode the formula to return (nRace*1000 + nBackground*100 + nclass) instead. This works for getting the correct inventory.
However, I suspect the engine uses the original formula to determine the model to use. In this case, it is not finding a character template since the original formula returns 5604 and this value cannot be parsed correctly since the race value (5) indicates no race.
Other than this, I have no other idea.
#10
Posté 24 décembre 2009 - 09:27
I looked at the formulas, but how do you set the formula for the race value? I'm trying to experiment by copying the race data into index "5" but am not having much success...
#11
Posté 24 décembre 2009 - 09:43
I can add new races using the existing classes and they work fine; we know that adding new classes by editing the core 2da and moving the rows up works, though it's not what Bioware would intend for us to use. I'm poking through other Excel files to see if I can track down possible reasons for it not working.
#12
Posté 24 décembre 2009 - 10:02
Edit: Actually, I guess TimelordDC already mentioned the gist of that post. At least it's confirmation there's an issue.
Found the post I was looking for: http://social.biowar...71/index/441833
Could that be it?
Found the post I was looking for: http://social.biowar...71/index/441833
Could that be it?
Modifié par FollowTheGourd, 24 décembre 2009 - 10:06 .
#13
Posté 24 décembre 2009 - 10:05
double post... edit and quote link overlapped apparently.
Modifié par FollowTheGourd, 24 décembre 2009 - 10:09 .
#14
Posté 24 décembre 2009 - 10:25
ladydesire, did you add the races towards the end (ID: 12) or at the top after the current playable races?
Edit: Yes, that formula came up as one of the issues in adding a new class without extending core scripts. Since the only script that uses that formula was the one (sys_chargen_h) that populates the inventory, I overrode the function.
I just did a quick test replacing the template for the Dalish Elf Rogue background/class and it wasn't picked up. It still picked the default template assigned in the original background_defaults worksheet.
So, my guess is that the engine DOES use that same formula to fetch the model or it is coded somewhere else ( I couldn't find any reference in any other excel file)
@orgo.love, I made a mistake in the value I gave.
The current Bioware formula will give 1000*2 + 100*26 + 1 = 4601
With my change, it will be 1000*2 + 1*100 + 26 = 2126
Edit: Yes, that formula came up as one of the issues in adding a new class without extending core scripts. Since the only script that uses that formula was the one (sys_chargen_h) that populates the inventory, I overrode the function.
I just did a quick test replacing the template for the Dalish Elf Rogue background/class and it wasn't picked up. It still picked the default template assigned in the original background_defaults worksheet.
So, my guess is that the engine DOES use that same formula to fetch the model or it is coded somewhere else ( I couldn't find any reference in any other excel file)
@orgo.love, I made a mistake in the value I gave.
The current Bioware formula will give 1000*2 + 100*26 + 1 = 4601
With my change, it will be 1000*2 + 1*100 + 26 = 2126
Modifié par TimelordDC, 24 décembre 2009 - 10:37 .
#15
Posté 24 décembre 2009 - 10:38
I added the one I was testing with at ID 12, and set the race value in the backgrounds files to 12000, (nRace = 12) so (12 * 1000) + (nclass * 100) + nBackground) works for new races. I'm wondering if the formula implementation in the game itself isn't properly parsing the equation, rather than it being a sequential read of the 2da file; I will test this with new races at a higher level to confirm.





Retour en haut






