Aller au contenu

Photo

How to grant a companion an extra Feat?


  • Veuillez vous connecter pour répondre
70 réponses à ce sujet

#51
ColorsFade

ColorsFade
  • Members
  • 1 267 messages

Yeah, unfortunately that didn't work. Here's what I have now: 

<UIScene name="SCREEN_CHARGEN_CLASS" 
scriptloadable=true
priority="SCENE_FE_FULLSCREEN" 
OnAdd=UIScene_OnAdd_SetupChargenScene("CHARGEN","CHARGEN_CLASS") 
OnAdd0=UIObject_Misc_ExecuteServerScript("gui_class_open")
fullscreen=true 
 />

From Lance Botelle's PDF, I see that scriptloadable=true must be set for scripts to interact with it. But even then, it's not firing. 



#52
Clangeddin86

Clangeddin86
  • Members
  • 220 messages

It does not work because of two reasons, the first one is very easy to fix, is that it fires about changing the windows of the levelup screen and not the ones of the character creation screen, but this is no big deal and could be fixed easily.

The second problem, the real problematic one, is the object of reference. This script has as subject an already existing character that is created in the game world (an existing object), with character creation, this character does not exist yet until finalized. I have no idea how to get around this.

 

Try with another approach instead:

Download these two 2das (replace your old classes.2da, but keep a backup of the old one in case it screwed up) and put them on override.

https://www.dropbox....lasses.2da?dl=0

https://www.dropbox....es_tyr.2da?dl=0

 

Hopefully this will be enough and won't screw your companion. Hopefully.



#53
ColorsFade

ColorsFade
  • Members
  • 1 267 messages

It does not work because of two reasons, the first one is very easy to fix, is that it fires about changing the windows of the levelup screen and not the ones of the character creation screen, but this is no big deal and could be fixed easily.

The second problem, the real problematic one, is the object of reference. This script has as subject an already existing character that is created in the game world (an existing object), with character creation, this character does not exist yet until finalized. I have no idea how to get around this.

 

Try with another approach instead:

Download these two 2das (replace your old classes.2da, but keep a backup of the old one in case it screwed up) and put them on override.

https://www.dropbox....lasses.2da?dl=0

https://www.dropbox....es_tyr.2da?dl=0

 

Hopefully this will be enough and won't screw your companion. Hopefully.

 

I see what you did there. Created a prerequisites file. It was a good idea. 

Didn't work. 

 

I even upped the BAB to 2 just to make sure. 



#54
ColorsFade

ColorsFade
  • Members
  • 1 267 messages

It does not work because of two reasons, the first one is very easy to fix, is that it fires about changing the windows of the levelup screen and not the ones of the character creation screen, but this is no big deal and could be fixed easily.

 

How do we fix that, because I think I can get it working if I can fix that part.

 

As for the script - I've modified the script from the level up significantly, because it doesn't need to do all those things that the level up script does. It's actually pretty basic. 


void main()
{	
	// This is to test that the script does something. So far, not working.
	SetGUIObjectText(OBJECT_SELF, "SCREEN_CHARGEN_CLASS", "TEST_TEXT",0, "CHANGED!");
	
	int n;
	int nRows = GetNum2DARows("classes");
	string sClass;
	for(n = 0; n < nRows; n++)
	{
		sClass = Get2DAString("classes", "Label", n);
		
		if(sClass == "PALADIN_OF_TYR")
		{
			RemoveListBoxRow(OBJECT_SELF, "SCREEN_CHARGEN_CLASS", "CLASS_LIST", sClass);
		}
	}
}

I think this makes point #2 not a big deal?



#55
Clangeddin86

Clangeddin86
  • Members
  • 220 messages

It doesn't work because OBJECT_SELF does not exist yet I'm afraid.



#56
Clangeddin86

Clangeddin86
  • Members
  • 220 messages

Or Maybe the RemoveListBoxRow has the final field wrong? The name of the row to remove is the same as the class Label?



#57
ColorsFade

ColorsFade
  • Members
  • 1 267 messages

Or Maybe the RemoveListBoxRow has the final field wrong? The name of the row to remove is the same as the class Label?

 

Yeah, I pull that from the 2DA. The label column. 

 

The problem is none of the script gets called at all. That first part of the script is changing a simple text label that I've added to that XML window. My initial text shows up, but the update never happens. 

 

It was the only thing I could think to do to test since I can't output debug text or anything. 

 

I thought OBJECT_SELF in this context was referring to the window... 

 

I'm still fooling around with the prerequisites 2da as well, but no luck there. Adding more prerequisites isn't making a difference. 



#58
Clangeddin86

Clangeddin86
  • Members
  • 220 messages

you put the cls_pres_tyr in the override folder yes? (just making sure, sometimes the silliest of oversights are the problem).



#59
ColorsFade

ColorsFade
  • Members
  • 1 267 messages

you put the cls_pres_tyr in the override folder yes? (just making sure, sometimes the silliest of oversights are the problem).

 

It's in my campaign folder with the rest of the modified 2DA files. 



#60
Clangeddin86

Clangeddin86
  • Members
  • 220 messages

Try moving it to override.



#61
ColorsFade

ColorsFade
  • Members
  • 1 267 messages

That worked. Grayed it out. 

 

Why did it not work in campaign then? 



#62
Clangeddin86

Clangeddin86
  • Members
  • 220 messages

You probably have to import to module via .hak if you want them to work on module only.



#63
ColorsFade

ColorsFade
  • Members
  • 1 267 messages

Ugh, this gets more and more complicated. 

 

I think in the end I'm just going to manually grant this guy certain Feats at certain levels. 

 

I granted enough XP through debug console to test the leveling, and after that I decided to check his spells. Sucker has access to every spell in the book. No restrictions. Arcane and Divine. The whole enchilada. 

 

No idea what causes that. 

 

Bummed. Feel like I've just wasted a bunch of time on this. It should be easier to customize something like this without all this frustration. 



#64
Clangeddin86

Clangeddin86
  • Members
  • 220 messages

Ah, right. Could be because spell tables are fixed on certain row IDs of classes.

What you have to do is make it a prestige class and grant it the paladin spellcasting progression feat at level 1.

Let's see what I can do about it, it's just a tweak with the 2das, shouldn't take long.



#65
Clangeddin86

Clangeddin86
  • Members
  • 220 messages

Ok, try downloading (and replacing the old versions, but make backup, just in case) these 2das.

 

https://www.dropbox....lasses.2da?dl=0

https://www.dropbox....vl_tyr.2da?dl=0

https://www.dropbox....al_tyr.2da?dl=0

https://www.dropbox....ap_tyr.2da?dl=0

 

Let's see if this fixes it once and for all.



#66
ColorsFade

ColorsFade
  • Members
  • 1 267 messages

Did not work. Now he has no spells at all. Pressing 'B' refuses to bring up the spellbook, and he has no quick cast either. 

 

Leveling him up and granting him levels of Divine Champion did not give him spells either. Something broke. 



#67
Clangeddin86

Clangeddin86
  • Members
  • 220 messages

Divine Champion should not give any spells at all, it's not a spellcasting class.

Try this. Give this companion of yours one level in paladin (the standard one), and the rest in the paladin of tyr class.

 

EDIT: If it doesn't work. Try with 4 levels of paladin and then rest with paladin of tyr. It may be that spellcasting as a whole does not unlock for paladin until level 4.



#68
ColorsFade

ColorsFade
  • Members
  • 1 267 messages

Well, on a Paladin, you can open the book at level 1, but have no spells in it (just tried that on my own char to make sure). 

 

kamal_ said in an older thread that spellcasting classes can be problematic because of the amount of hardcoding. And I'm guessing that's exactly what is happening when I use the default Paladin settings for the class. There is probably some hard-coded script somewhere that filters the spells for a Paladin. Since my class isn't a Paladin exactly, that filtering is gone. 

 

For instance, I just now when into some of the scripts in the data director, and there's a lot of checks against the standard class constants, for things like Dispel magic, etc. 

 

I'm guessing my custom class would break all that stuff. 

 

So, I think the clear winner here is to keep him a Paladin, and then use some scripting to manually give him some feats (like the deity weapon feats), and possibly revert back to your scripts.XML if I feel bonus feats are necessary. 

 

He needs to be a true Paladin to keep from borking the whole thing up apparently. 



#69
Clangeddin86

Clangeddin86
  • Members
  • 220 messages

Did you try levelling him up past level 4? That's when they gain spells.
I mean both as 1 paladin and 4 tyr and as 4paladin /1 tyr



#70
ColorsFade

ColorsFade
  • Members
  • 1 267 messages

Did you try levelling him up past level 4? That's when they gain spells.
I mean both as 1 paladin and 4 tyr and as 4paladin /1 tyr

 

I didn't because I've already changed the classes.2da file to get his spellcasting back, trying to debug why he has access to *all* spells and not just his own. 

 

Thinking logically, I decided to set his CLASS_TYPE to the same string value as a paladin (CLASS_TYPE_PALADIN), figuring scripts would pick it up and use it. But nothing changed. Still has all the spells available. 

 

That part I just don't get. Everything else about him is setup the same way as a paladin now. What causes spells to filter? Where is it setup to say which spells he gets, exactly?



#71
ColorsFade

ColorsFade
  • Members
  • 1 267 messages

Gave him a level of Paladin. Open spell book: he has two icons at the top. One for Tyr's Chosen, one for regular Paladin. 

 

Regular Paladin has no spells. Tyr's Chosen has access to every spell in the game. 

 

So that's that. 

 

And some interesting information here. Not sure what to make of it.