Jump to content

RE template/tutorial?


Guest Guest

Recommended Posts

Guest Guest

Would it be possible for one of you regular devs to post a kind of 'generic' RE code template which contains only those files and bits of code which are required for the typical RE - an NPC in a given area and a dialogue tree, for example, and a quick explanation of what goes where?

 

I know there are already many tutorials out there, but many of those seem dedicated to building new party members or whatever. Something dedicated to RE and its particular requirements would, I think, be (or seem) much more helpful.

Link to comment

Easy enough: copy-paste everything from Chandra encounter - I think it's our latest/simplest template encounter, coding-wise.

(Writing-wise, I quite enjoyed Western Paladin's sense of humor. :cool: )

 

If you need commentary:

 

0) Chandra(and related) encounters consist of three files: dialogue file, creature file and (a piece of) area script.

 

1) Read coding in .d for real beginners to understand .d peripetia.

 

2) Creating a cre file may prove difficult(it certainly is for me). So the best way to do so is stealing a .cre file from the vanilla game(not from a mod, your cre may inherit the mod's faults) and editing it.

 

I don't really know what to advise here, except opening Near Infinity and trying. If stuck, try Ace's NPC tutorual, .cre section. Yes, there's a link to PDF file, but if you, like me, don't read PDF, there's still a regular post.

 

3) (a piece of) Area script.

 

IF
AreaCheck("AR0709") // or another Area name - AR0406 for the Copper Coronet
Global("RE_NPCExists","GLOBAL",0)
Gender(Player1,MALE) // optional; Chandra doesn't have any dialogue for the female PC, however, so here it is necessary
THEN
RESPONSE #100
CreateCreature("RE_NPC",[300.300],0) // the most important line. Press CTRL-X in game over your character to get the desired [X,Y] pair
SetGlobal("RE_NPCExists","GLOBAL",1) // we update the variable, so that your NPC will not spawn more than once. We don't need multiple Mary's, right?
END

 

4) .tp2 - again, copy-pasting from RE is the best bet.

Link to comment

Archived

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

×
×
  • Create New...