Jump to content

Taking another crack at my mod


ericp07

Recommended Posts

Hello,

 

This feels like as good a time as any to try working on my mod, so today I began writing new .d and .tp2 files and such, as described in the "How to make an NPC if you are a n00b" tutorial. Also created the .cre and .baf files. It's a (re)start...

 

Hinaeariel Gwaithoron is a female Copper (Sylvan) Elf ranger, who serves a Faerunian deity, Mielikki, Lady of the Forest. Her history includes having saved a unicorn's life, and the unicorn was sacred to Mielikki, so she offered favor for service. As such a servant, her sworn enemies are Malarites, followers of Mielikki's opposing deity, Malar, the Beast Lord. Specifically, as Hinaeariel's favored enemies are lycanthropes, she strives against the People of the Black Blood, a cult of evil lycanthropes among the Malarites. She meets the party during her hunt.

 

To create a "champion of Mielikki" kit might be biting off more than I can chew, but she'll need something to distinguish her from the vanilla ranger, to increase her value and appeal within a party. She'll begin, I think, as 8th level, with the option to begin at a couple higher levels, depending on the MC's experience level. Hinaeariel fights with two weapons, for the most part, but also knows how to use a longbow. She'll carry some magical gear (some sort of leather or studded leather, scimitar, battleaxe, and perhaps her pendant will benefit her vs. malarites, or just vs. lycanthropes), but not too much. She's rustic, loves the wilderness, and dislikes artificial settlements and encroachments on forest lands.

 

Plenty of room here for content, of course, and it'll be slow going to get all the files written up. I'll have plenty of questions, and I want the mod, of course, to be distinguishable from those already out there, but just as enjoyable :p

 

If there's any particular forum I should use, please let me know, and I'll carry on as advised.

 

Happy modding,

Eric

Link to comment

Hello again,

 

My notes show two ways to spawn my NPC, and I want the character's XP to be close to the MC's when joining the group, so I need to know if I should use this:

 

IF

Global("HINExists","AR1200",0)

THEN

RESPONSE #100

SetGlobal("HINExists","AR1200",1)

CreateCreature("HIN",[387.809],3)

END

 

Or this:

 

IF

Global("EP#HinSpawned","GLOBAL",0)

!Global("EP#HinSpawn","AR1200",1)

Global("EP#HinJoinedOnce","GLOBAL",0)

XPLT(Player1,280001)

THEN

RESPONSE #100

ActionOverride("EP#Hin",DestroySelf())

CreateCreature("EP#Hin10",[387.809],6) // Hinaeariel

SetGlobal("EP#HinSpawned","GLOBAL",1)

SetGlobal("EP#HinSpawn","AR1200",1)

END

 

IF

Global("EP#HinSpawned","GLOBAL",0)

!Global("EP#HinSpawn","AR1200",2)

Global("EP#HinJoinedOnce","GLOBAL",0)

XPGT(Player1,280000)

XPLT(Player1,600001)

THEN

RESPONSE #100

ActionOverride("EP#Hin",DestroySelf())

CreateCreature("EP#Hin11",[387.809],6) // Hinaeariel

SetGlobal("EP#HinSpawned","GLOBAL",1)

SetGlobal("EP#HinSpawn","AR1200",2)

END

 

IF

Global("EP#HinSpawned","GLOBAL",0)

!Global("EP#HinSpawn","AR1200",3)

Global("EP#HinJoinedOnce","GLOBAL",0)

XPGT(Player1,600000)

XPLT(Player1,1000001)

THEN

RESPONSE #100

ActionOverride("EP#Hin",DestroySelf())

CreateCreature("EP#Hin13",[387.809],6) // Hinaeariel

SetGlobal("EP#HinSpawned","GLOBAL",1)

SetGlobal("EP#HinSpawn","AR1200",3)

END

 

IF

Global("EP#HinSpawned","GLOBAL",0)

!Global("EP#HinSpawn","AR1200",4)

Global("EP#HinJoinedOnce","GLOBAL",0)

XPGT(Player1,1000000)

THEN

RESPONSE #100

ActionOverride("EP#Hin",DestroySelf())

CreateCreature("EP#Hin15",[387.809],6) // Hinaeariel

SetGlobal("EP#HinSpawned","GLOBAL",1)

SetGlobal("EP#HinSpawn","AR1200",4)

END

 

Also, I'd appreciate any advice on how to write all this more efficiently, and so that it won't cause issues with other mods.

 

Thanks,

Eric

Link to comment
I want the character's XP to be close to the MC's when joining the group
Then use the latter. You're already using a unique prefix, so it's unlikely to cause issues with other mods, unless it's right on top of another creature.
Link to comment

Or you could use the scripting that the Level 1 NPCs gives or make your own, and so make Hinaeariel more customizable for the player. So I would use this:

IF
Global("HINExists","AR1200",0)
THEN
RESPONSE #100
SetGlobal("HINExists","AR1200",1)
CreateCreature("HIN",[387.809],3)
END

With a customized join after script that levels him up(name it for example as ER#HiNoJ.bcs) and put it to the .cre file, (yes it comes from ER# + Hinaeariel Not Joined), combine the leveling up scripting with an area check and AI changer like this:

...
IF 
 !AreaCheck("AR1200")
 Global("EP#whateveryouwish",GLOBAL,0)
THEN
 ChangeAIScript("ER#Hin",OVERRIDE)
 SetGlobal("EP#whateveryouwish",GLOBAL,1)
END

The AI changes to the script that then controls dialog etc. (ER#Hin.bcs).

Edit; Just to remove a few letters so it now more in line with the later message... :p

Link to comment

Using a leveling script like Jarno describes is OK when the NPC involved doesn't have spells to memorize, but it's a bit of a pain when the NPC does. It means that a spellcaster NPC has to rest before she's of any use to the party. One might argue that as a ranger, spellcasting is not her primary function, and that she'll only have one or two spells on joining anyway, but that's up to you.

 

The choice is ericp07's.

 

Two examples that ericp07 should be familiar: Haldamir is a pureclass fighter, so I wanted the player to have more control over his weapon prof selection. His leveling script is in his override script. Gavin is a cleric. I had wanted to to do the spawn/respawn thing since he would need to have spells memorized, but he spawns in AR0408, which doesn't have its own script. AR0400.bcs is already plenty cluttered and I didn't want to cram anything else in there, so I wound up doing the same thing as Haldamir, even though it wasn't my first choice.

 

AR1200.bcs is nowhere near as crowded as AR0400.bcs, though, so you might be fine putting it in the area script.

Link to comment

That kind of depends on which mods you've got installed. If you're using L1NPC, all the NPCs are going to be leveling up when they join the party anyway. If you're using ToB-style NPCs from BG2 Tweaks, ditto.

 

Since your typical BioWare NPC has 2 banters max with other NPCs, at most 5 banters with the PC, and surprisingly few interjections, I'd say that the biggest clue that the NPC is a mod NPC is the fact that the NPC is talking all the time.

Link to comment

OK, I'll use the longer scripting example I posted earlier, and see how that goes.

 

As for the file, is this spawning script supposed to be its own .baf (if so, would that make it EP#Hin.baf?), or should this be AR1200.baf, or does the code go into another file? I did create AR1200.baf, and it contains only this:

 

IF

Global("HINExists","AR1200",0)

THEN

RESPONSE #100

SetGlobal("HINExists","AR1200",1)

CreateCreature("HIN",[387.809],3)

END

 

Of course, I don't want that, but instead the variable-level option.

 

I was going to ask what else I should include in AR1200.baf, but that's getting ahead of myself :p Should I be using that filename, or is it better to use my prefix, and create EP#H1200.baf, or similar?

 

Thanks,

Eric

Link to comment

In the interest of being organized (and consistent?), I've made a list of the files I should use for Hinaeariel's mod:

 

Un-joined dialogue: EP#Hin

Joined dialogue: EP#HinJ

Banter file: BEP#Hin

Post dialogue file: EP#HinP

ToB un-joined dialogue: EP#Hin25

ToB joined dialogue: EP#Hi25J

ToB banter file: BEP#Hi25

ToB post dialogue file: EP#Hi25P

 

Script name/death variable: EP#Hin

Override script: EP#Hin

Dream script: EP#HinD

ToB override script: EP#Hin25

ToB dream script: EP#Hi25D

 

So far, I've created only a small number of these, as I'm taking small steps to build everything. Do I have the basics covered here?

 

Thanks,

Eric

Link to comment
As for the file, is this spawning script supposed to be its own .baf (if so, would that make it EP#Hin.baf?), or should this be AR1200.baf, or does the code go into another file?
Well, whatever you feel is right, cause you'll be extending already existing script, not making a new one.

 

If you went with the one I would use, it own file of course, and you only would have to extend the ar1200 script with this:

IF
Global("HINExists","AR1200",0)
THEN
RESPONSE #100
SetGlobal("HINExists","AR1200",1)
CreateCreature("HIN",[387.809],3)
END

 

The creature override script would be the ER#HiNoJ.bcs... would be the code that would level up the creature, would be able to be how ever precise as you like it to be in the experience scale, the end of it that I wrote the code above, would launch only when the area is not ar1200, will then change the script to another one; the primary one... to EP#Hin(.bcs) for example.

 

This way, you only have to add the short code to summon one creature to the area with the area-script, and everything else is done by your own code and scripts, and you'll have less creatures and less setted globals.

 

I was going to ask what else I should include in AR1200.baf, but that's getting ahead of myself :p Should I be using that filename, or is it better to use my prefix, and create EP#H1200.baf, or similar?
It doesn't matter what you name the file as, as long as you know what it does, as you'll be extending the existing file that's already in the game, not replacing it with your own.

 

Banter file: BEP#Hin

...

ToB banter file: BEP#Hi25

I would recommend that you would use the EP#Hinb(.d->dlg) and EP#Hib25(.d->dlg), as the B could take someoneelses slot, it's not reserved as of yet, but you would have to...
Link to comment

OK, I've sorted out the AR1200.baf issue and renamed the banter files (and their reference in other files), so I'll proceed from there. So far, I've got a character who appears in Windspear Hills area, conveniently close to a group of lycanthropes already in the vanilla game (more thoughts about that later). She will approach the party to propose joining. She'll have some +2 gear (fighting the temptation to outfit her as she would be in the PnP game), being most likely some armor, a scimitar, and a battle axe, in keeping with her concept of being a two-weapon specialist. I'll likely give her a composite longbow, but it needn't be enchanted. Her special interest will be to seek and destroy followers of Malar. I might still have some notes on how to add Malarites as a ranger's favored enemy in one of the game files, so I can assign Hinaeariel's favored enemy as such, and designate certain creatures appropriately. They'll be as interested in destroying her as she'll be in destroying them, so I'll need to represent that in their .cre files somehow as well.

 

That's about all I can think of right now. Trying to go slowly, and not tackle too many concepts at once here.

 

Thanks,

Eric

Link to comment
I might still have some notes on how to add Malarites as a ranger's favored enemy in one of the game files, so I can assign Hinaeariel's favored enemy as such, and designate certain creatures appropriately. They'll be as interested in destroying her as she'll be in destroying them, so I'll need to represent that in their .cre files somehow as well.
This would be somewhat tough, because you'd have to add a race of "Malarite" to race.ids. That much is possible using this (Taimon's .exe patch) but the thing is, most Malarites are not a separate race, but humans usually.

 

It might be better to add some sort of priority targetting to Malarites via your NPC's script, perhaps by way of the "specific" field (the one after race and class, which is usually unused). Indeed if you do this, you could not only allow your NPC to target them before any other enemies, but invoke special dialogue from your NPC as well if you wished (e.g. "The heathen beast worshippers are present! We must purge their filth from this land!").

 

BTW, Infinity Animations adds the Malarite animation from IWD to shadow druids (the nasty Malar-worshipping kind), so it could perhaps assign them a "specific" field while it's at it so that you could identify them via script.

Link to comment
I might still have some notes on how to add Malarites as a ranger's favored enemy in one of the game files, so I can assign Hinaeariel's favored enemy as such, and designate certain creatures appropriately. They'll be as interested in destroying her as she'll be in destroying them, so I'll need to represent that in their .cre files somehow as well.
This would be somewhat tough, because you'd have to add a race of "Malarite" to race.ids. That much is possible using this (Taimon's .exe patch) but the thing is, most Malarites are not a separate race, but humans usually.

 

It might be better to add some sort of priority targetting to Malarites via your NPC's script, perhaps by way of the "specific" field (the one after race and class, which is usually unused). Indeed if you do this, you could not only allow your NPC to target them before any other enemies, but invoke special dialogue from your NPC as well if you wished (e.g. "The heathen beast worshippers are present! We must purge their filth from this land!").

 

BTW, Infinity Animations adds the Malarite animation from IWD to shadow druids (the nasty Malar-worshipping kind), so it could perhaps assign them a "specific" field while it's at it so that you could identify them via script.

 

Looks like a good way to do it. I wouldn't want to use the race category, as "Malarite" will include evil lycanthropes as well as priests of Malar...and I should probably use the same designation for the custom creature I'll be introducing with this mod: the Beast of Malar. I got the beast to work before, but had to use the panther (or leopard? or spotted lion?) animation for it, colored black. I'll have to find out if some kind soul out there would be willing and able to customize such an animation to give it a blood-red muzzle and front paws. This creature is an outsider, meaning not native to the Prime Material Plane. It appears, hunts, and returns to its home plane after a successful hunt.

 

Thanks,

Eric

Link to comment
That kind of depends on which mods you've got installed. If you're using L1NPC, all the NPCs are going to be leveling up when they join the party anyway. If you're using ToB-style NPCs from BG2 Tweaks, ditto.

 

Since your typical BioWare NPC has 2 banters max with other NPCs, at most 5 banters with the PC, and surprisingly few interjections, I'd say that the biggest clue that the NPC is a mod NPC is the fact that the NPC is talking all the time.

 

My own installation will include those mods, but of course every individual who installs Hinaeariel would have a different mix.

 

This character will certainly have several lines of dialog, the majority occurring in wilderness areas. At this point, I'd like for there to be a friendship path, but I'm still undecided on a romance path. By far my greatest concern is how to make the mod interesting enough for someone besides myself to want to install and use it :p

 

Thanks,

Eric

Link to comment
I should probably use the same designation for the custom creature I'll be introducing with this mod: the Beast of Malar. I got the beast to work before, but had to use the panther (or leopard? or spotted lion?) animation for it, colored black. I'll have to find out if some kind soul out there would be willing and able to customize such an animation to give it a blood-red muzzle and front paws.
I would just use the black panther animation (MGCP at 0x7f0a) for now. Eventually, you could ask someone in the Infinity Animations forum to port the NWN Beast of Malar (c_cat_mpanth.mdl).

bmalar.gif

You might want to wait on that until your mod gets closer to completion, because someone probably doesn't want to convert something that's only going to end up in a yaum (yet another unfinished mod :p).

 

Erephine's the only person I know of who currently does this sort of work and she hasn't been around much lately (though I have her notes and might take a stab at it in exchange for a copy of 3ds Max :down:).

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...