Jump to content


Photo

Creating new races for NPCs


  • Please log in to reply
14 replies to this topic

#1 AnnabelleRose

AnnabelleRose

    The great pretender... of modding!

  • Modder
  • 2083 posts

Posted 29 May 2009 - 01:13 PM

Ok, so I thought I had figured out how to do this, but it is not working.

I am trying to create a half-dyrad, and have that show on her bio page under race.

So I looked around, wipped up a Weidu patch to install before creating the .cre (I figured I could then edit her race in either NI or Shadowkeeper.

Then once her .cre is set with that flag, I can export her to my work mod file, and incude the same patch as part of the instilation package for the mod itself when it is released.

It is simply not working, and I was hoping on of you code gurus could help me get it on track.

The patch is attched below.

Attached Files


- The transitioned former modder once known as MTS.


#2 Jarno Mikkola

Jarno Mikkola

    The Imp in his pink raincoat.

  • Member
  • 10911 posts

Posted 29 May 2009 - 01:31 PM

I am trying to create a half-dyrad, and have that show on her bio page under race.

That's Statistics page, as the Bio can be remade by just copying the .cre file in WeiDU and then:
SAY BIO ~xyz~
Where the xyz is the whole Bios textual content. Or it can be done with horrific Replace Textually thing, but I don't know how... yet.
Or, was that what you meant, I have no idea how the Statistics(Record) page's race can be changed, but it can, cause I have seen that somewhere.

Edited by Jarno Mikkola, 29 May 2009 - 02:16 PM.

Deactivated account. The user today is known as The Imp.


#3 AnnabelleRose

AnnabelleRose

    The great pretender... of modding!

  • Modder
  • 2083 posts

Posted 29 May 2009 - 01:49 PM

I must be missing something, because here is the code I have to install her 'base' creture file:

COPY ~Shy/CRE/MTS#tb.cre~ ~override/MTS#tb.cre~

SAY NAME1 ~Tytlebaum~

SAY NAME2 ~Tytlebaum~ 

SAY BIO ~When you ask about her past, TYTLEBAUM smiles sadly, eyes becoming distant. Her voice is clear and she begins her tale. She was born of two great mages, her human mother Tilda and her elven father Braum had had a bond though both magic and love that they felt had been made manifest in their beautiful daughter. 

It wasn't long before Tytlebaum began to disappoint them showing little promise toward their beloved magic. After much research the two disappeared into the lab they shared desperate to use magic to aid their child. Because of Tytlebaum's ineptitude she was often left in the care of servants while her parents ventured out in search of the components necessary for their magical workings. It was on one of those particular jaunts, Tilda had a feeling and they exhausted their magic traveling around Faerūn. Tytlebaum was a precocious child and had once again lost her servant in the hallways. On stealthy feet quite sure of herself she tiptoed into the amazing laboratory eager to see what held her beloved parents attention so raptly. At the back of the room a great cauldron bubbled between two workbenches there was a stool near one of the workbenches and Tytlebaum quickly climbed atop it, desperate to see inside it. As she perched precariously on the stool her young fingers reached out to grasp something for leverage. It was at that moment that her parents burst into the room, her mother just ahead of her father screaming "TYTLEBAUM NO". The delicate glass tubing on which Tytlebaum's fingers had come to rest snapped and she plunged gracelessly into the bubbling vat. Tilda rushed to the vat franticly seeking signs that her child was still alive while Braum stood transfixed. With a groan of shock with relief Tilda pulled the tiny child from the vat and began to wipe her off with the bottom of her skirt. Tytlebaum's once blue eyes flashed a forest green her slightly pointed ears had grown longer and the pretty silver waves of her hair had become green. She stared at her mom for a long time confused, afraid and aware now of strange magic in her body. 

Tytlebaum remained in her parents care until she was sixteen although she avoided them and they her. She developed a bubbling sense of humor which was necessary to help her cope with the faeries bumps and bruises left from her now clumsy person. When she was sixteen she packed her bags, took what little she had, and went in search of someone who could teach her and would not judge her. It was year before she came in contact with Cehardra, who has never judged her and takes her 'quirks' with good-natured humor. Tytlebaum had been with Cehardra a year before she was sent on this quest.~ 

SAY MORALE ~Eeeeeeeeeeeeeeeeek!~

SAY HAPPY ~Well this is better then the first daisies in spring.~

SAY UNHAPPY_ANNOYED ~Well this is about as much fun as a bad case of poison ivy.~

SAY UNHAPPY_SERIOUS ~I'll just close my eyes and pretend I'm in a glade.~

SAY UNHAPPY_BREAKING ~So much adventure, so few friends.~

SAY LEADER ~Oh I don't want to lead. Maybe I'll trip on something.~

SAY TIRED ~(stumbles over an invisible rock) I'm so sleepy I can barely stay on my feet.~

SAY BORED ~I am sooo... bored! Maybe we can get some candy. (trips)~

SAY BATTLE_CRY1 ~AHHHHHHHH... oops.~

SAY BATTLE_CRY2 ~I may be cute, but I am vicious.~

SAY BATTLE_CRY3 ~Look, the Tarasque! (points in a random direction) AHHHHHH.~

SAY BATTLE_CRY4 ~Your gonna get beat up by a girl.~

SAY DAMAGE ~Oooh that stings a little.~

SAY DYING ~I see trees in the distance. So many trees....~

SAY HURT ~Oooh, that's kinda rough.~

SAY AREA_FOREST ~Ahhhh I feel a certain kinship here.~

SAY AREA_CITY ~Ahhh.. There not so bad. (stumbles over something invisible)~

SAY AREA_DUNGEON ~I feel the weight of the world on my shoulders.~

SAY AREA_DAY ~Ahhh... sunshine, the essence of life.~

SAY AREA_NIGHT ~Look at all the pretty stars! (stumble)~

SAY SELECT_COMMON1 ~That tickles.~

SAY SELECT_COMMON2 ~(trips) Could you not poke me so hard?~

SAY SELECT_COMMON3 ~In a minute. I'm thinking.~

SAY SELECT_COMMON4 ~Sunshine and lollypops and...~

SAY SELECT_COMMON5 ~I feel so special.~

SAY SELECT_COMMON6 ~Does anyone know where I left my shoe?~

SAY SELECT_ACTION1 ~Eh, hold your horses, I'm getting? there.~

SAY SELECT_ACTION2 ~As quick as I can (trip)~

SAY SELECT_ACTION3 ~Anything else while you're at it?~

SAY SELECT_ACTION4 ~If I do this can I have a kitten?~

SAY SELECT_ACTION5 ~If I can't have a kitten, can I have a puppy instead?~

SAY SELECT_ACTION6 ~Ok, and then lemonade and candy kisses for everybody!~

SAY SELECT_ACTION7 ~(turns to walk in the indicated direction tripping over her own shoe, crashing into the nearest object, and falling down) Maybe later?~

SAY SELECT_RARE1 ~If my toes will get me there.~

SAY SELECT_RARE2 ~As the vine grows.~

SAY CRITICAL_HIT ~HAHA, GOT YA!~

SAY CRITICAL_MISS ~Did anybody see that?~

SAY TARGET_IMMUNE ~Well that's no fair!~

SAY INVENTORY_FULL ~Gosh, I'm not a packhorse.~

COPY ~Shy/2DA/BlankEpilogue.2da~ ~override/MTS#TBD.2da~

		REPLACE_TEXTUALLY ~PORTRAIT~ ~MTS#TBL~ 

		REPLACE 99999 ~~

- The transitioned former modder once known as MTS.


#4 GeN1e

GeN1e

    A very GAR character

  • Modder
  • 1604 posts

Posted 29 May 2009 - 03:06 PM

Afaik it's not enough to update race.ids for a race name to display in the statistics page. In fact, not every entry in ids actually shows up in game. But what that extra condition is I don't know.

Edited by GeN1e, 29 May 2009 - 03:07 PM.

Retired from modding.


#5 Miloch

Miloch

    Barbarian

  • Modder
  • 6579 posts

Posted 29 May 2009 - 09:39 PM

I think GeN1e is right. I was thinking you could at least get her race to show up as dryad if you added that to race.ids where it should be at 114 (0x72). But when I did that and force-joined a dryad, all I got was a blank where her race should've been :(. I get the same blank with fairy (120) which is already in race.ids. Granted, I wasn't making proper NPCs out of them but I don't know if that makes a difference, because when I force-join humans, I see their race. I do think some work beyond the standard, but I don't know which any more than GeN1e does. Maybe someone like Taimon could figure it out.

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#6 AnnabelleRose

AnnabelleRose

    The great pretender... of modding!

  • Modder
  • 2083 posts

Posted 05 June 2009 - 12:10 PM

I guess I will file this under "It can be done in theroy, but as to date, no one has figured out how to do it yet".

- The transitioned former modder once known as MTS.


#7 Taimon

Taimon
  • Member
  • 387 posts

Posted 03 July 2009 - 01:17 AM

Can't be done without EXE patching - the race id -> strref mapping is hardcoded.

#8 Taimon

Taimon
  • Member
  • 387 posts

Posted 04 July 2009 - 11:40 AM

I've externalized the race strrefs.
This should be considered experimental work. (It was more like a proof of concept for me.)

Install racetext.tp2 and copy/rename racetext.2da into the override.
The first column in the 2da is the race id and the second the corresponding strref.
You can add whatever race you want.

If you notice a memory leak, report back here - the CString lib stuff is quite difficult to manage in assembly.

Attached Files



#9 Chevalier

Chevalier

    Knight of the Realms

  • Modder
  • 2405 posts

Posted 04 July 2009 - 09:37 PM

Great Work Taimon! :clap:

This is really cool for Joinable NPCs! Can we please have here or somewhere else a list of Mod added Races and info to keep from having mod conflicts? :whistling:

I Ride for the King!


a.k.a. Chev


#10 AnnabelleRose

AnnabelleRose

    The great pretender... of modding!

  • Modder
  • 2083 posts

Posted 25 July 2009 - 02:50 PM

Taimon, you rule.


Now I am one step closer tomaking my mod look less like modded content.

- The transitioned former modder once known as MTS.


#11 Miloch

Miloch

    Barbarian

  • Modder
  • 6579 posts

Posted 27 July 2009 - 12:23 PM

Nice. Has anyone tested it or can we assume it works as planned as does most everything else by Taimon?

(What's with the remake from Hellraiser to Freddy Mercury, MTS, and where's the BG2 box? :huh:)

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#12 AnnabelleRose

AnnabelleRose

    The great pretender... of modding!

  • Modder
  • 2083 posts

Posted 01 August 2009 - 12:26 AM

I have not tested it yet, I plan to shoot him a PM later with how I think it will work my my mod (as part of an installer), to make sure I am not too stupid to do this on my own.

As for the avatar change, I had been using the same one (or variations) for many, many years and decided it was time for a change.

- The transitioned former modder once known as MTS.


#13 Miloch

Miloch

    Barbarian

  • Modder
  • 6579 posts

Posted 10 November 2009 - 02:38 PM

I can report this appears to work as far as I can tell, at least for adding a race that has an existing string reference.

However, how would one add a new race or a race with a new string reference? The racetext.2da has hardcoded values, so if you're adding a new string reference at install time, you'd have to figure out what number it is or do some hackery with INSERT_BYTES and SAY while copying racetext.2da or do something even more obscure, right?

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#14 Taimon

Taimon
  • Member
  • 387 posts

Posted 10 November 2009 - 03:41 PM

Don't know, be creative. :)
I would probably do an OUTER_PATCH_SAVE + SAY to get the strref into a variable.

#15 GeN1e

GeN1e

    A very GAR character

  • Modder
  • 1604 posts

Posted 11 November 2009 - 02:54 AM

if you're adding a new string reference at install time, you'd have to figure out what number it is

<<<<<<<<racetext.2da
2DA V1.0
-1
STRREF
1 7193
2 7194
3 7197
4 7182
5 7195
6 7196
7 53186
153 8332
255 new_name
>>>>>>>>
COPY ~racetext.2da~ ~override~
REPLACE ~new_name~ ~Miloch the barbarian~

Edited by GeN1e, 11 November 2009 - 02:55 AM.

Retired from modding.