Home » SIRTECH CLASSICS » Jagged Alliance 2 » JA2 Technical Department » How to make an editor?
How to make an editor?[message #175529] Wed, 13 February 2008 15:04 Go to next message
Will Gates is currently offline Will Gates

 
Messages:1012
Registered:September 2006
Location: Far far away.
This topic may seem a little off-whack in these 1.13 days but I want to know how people made the various editors for 1.07 etc. How was We-edit made? Palette editor? SM-edit? etc etc etc. How easy is it to make one (to turn militia allowed in various towns on & off in 1.07 for instance)? What programs would you need?

Eldritch & arcane. :blah:

Report message to a moderator

Sergeant Major
Re: How to make an editor?[message #175568] Thu, 14 February 2008 01:52 Go to previous messageGo to next message
Antares is currently offline Antares

 
Messages:12
Registered:June 2007
Location: Canada
I haven't used any of those in a long, long time, but IIRC the author of WeEdit used a hex editor to read the savegame files, so you could alternately: save a game, change something around so that you can find the memory addresses dealing with what you changed; as well as edit the file through the editor and load the save to see what changed, when you aren't sure what that address holds. Once you figure it out, you can write a compact program in almost any language you want that simply provides a front-end to give you choices about what to edit, and it edits those addresses in the savegame file.

I'm not sure of the specifics of how the other programs work or what exactly they do, so I couldn't tell you right now.

Report message to a moderator

Private
Re: How to make an editor?[message #175569] Thu, 14 February 2008 02:31 Go to previous messageGo to next message
Khor1255 is currently offline Khor1255

 
Messages:1817
Registered:August 2003
Location: Pleasantville, NJ
You may be right. The fact that most values were not externalised until the 1.13 meant that with the old editor you were very limited as to what you could edit and the results were often unsatisfactory.

I can't imagine ever going back to a non 1.13 version. Perhaps an older version of the 1.13 before some of the buggier features were included but never pre 1.13.

However, a useful NPC editor is a necessity for those of us making full scale mods. I have been over and over just trying to get the Dedrianna character to stop slapping the Elliot character and have as yet to be sucessful.

If anyone could make a new editor I really wish one that edited .npc files would be the first. What we have now is one that relies on a huge ammount of guesswork because it has many unknown fields. Even a more comprehensive version of the editor we have would be better than nothing.

You can see by all of the large scale mods that have been made how very unpredictable and incomplete the .npc edits are. We really need something that externalises or at least fully edits .npc files.

Report message to a moderator

Sergeant Major
Re: How to make an editor?[message #175572] Thu, 14 February 2008 02:59 Go to previous messageGo to next message
Antares is currently offline Antares

 
Messages:12
Registered:June 2007
Location: Canada
You mean that Deidranna will slap Elliot when they're simply placed together? Awesome.

As it is I don't know if I'm going to be able to finish up the few things that I wanted to with this game (externalizing and restructuring the laptop, some others) as I'm going to be working my own engine the moment I have "real" free time in the next little while.

Report message to a moderator

Private
Re: How to make an editor?[message #175573] Thu, 14 February 2008 03:17 Go to previous messageGo to next message
Khor1255 is currently offline Khor1255

 
Messages:1817
Registered:August 2003
Location: Pleasantville, NJ
Well, she only slaps him when her .npc file tells her to. The problem is, the utilities that deal with .npc files are so nebulous that noone seems to know how to make even simple changes to them.

Scorpion helped me to get a little into this but when the first SAM site was captured she tried to slap elliot again and the game froze.

I have tried for years now to figure out these .npc scripters and while I'm not the sharpest tool in the woodshed I am tenacious and not a complete newb when it comes to modding so I know there are serious limitations with the existing npc editors. I hope someone either fixes the ones that are out there or even better makes a fully functional one from the ground up.

Back when these npc editors were made the source code was not even available. Surely someone could come up with a good npc editor with all the code information now available?

Report message to a moderator

Sergeant Major
Re: How to make an editor?[message #175593] Thu, 14 February 2008 11:40 Go to previous messageGo to next message
Will Gates is currently offline Will Gates

 
Messages:1012
Registered:September 2006
Location: Far far away.
Fine, good even, can you reco a good hex editor?

Khor I answered your tank questions on other thread and as for Q-deedee, what happen if you just renumber her (and all her speeches which is the tedious bit) does she still slap ediot? Or renumber him instead? Maybe it cause freezez I dunno.

Report message to a moderator

Sergeant Major
Re: How to make an editor?[message #175595] Thu, 14 February 2008 12:03 Go to previous messageGo to next message
Khor1255 is currently offline Khor1255

 
Messages:1817
Registered:August 2003
Location: Pleasantville, NJ
I'm not sure what you mean by renumbering her?

Change her character profile number ala proedit?

This would of course remove her from being the prime objective of the game and therefore nullify the entire use I had for 'her'.

I think maybe you mean something else.

I thought about using some other .npc files and just renumbering them to the 160-186 that are required for her cutscenes and lately I have considered even somehow bypassing the whole cutscene process but I'd really prefer a good way to alter her behavior.

The problem seems to be in the fact that I changed her to a man. Now when she goes to slap Elliot I think the game looks for the appropriate animation and freezes when it tries to use a female slapping animation on a male bodytype.

I am not sure if this is the exact cause and for the purposes of my storyline I want the slapping removed anyway so...

I was successful using a method scorpion walked me through for the slap scenes in the first two towns (though I have since overwritten those fixed files by accident) but when it got to the Drassen Sam site slap fest it locked up again. I'm not sure why.

Anyway, a better npc editor is really something that would help modders out a lot. Even the successful large scale mods have serious npc/quest problems and this is a shame because the rest of those great works are so well excecuted.


I used to have a hex editor but never used it. If I find it and I can mail it to you I will let you know.

Report message to a moderator

Sergeant Major
Re: How to make an editor?[message #175596] Thu, 14 February 2008 12:28 Go to previous messageGo to next message
the scorpion

 
Messages:1834
Registered:September 2004
Location: CH
khor

what will work as desired is to copy-paste the .npc files in question from ja2 RR.

afterwards, you'll only have to re-adjust the speech lines, but i think this is actually less work.

Report message to a moderator

Sergeant Major
Re: How to make an editor?[message #175643] Thu, 14 February 2008 20:39 Go to previous messageGo to next message
Khor1255 is currently offline Khor1255

 
Messages:1817
Registered:August 2003
Location: Pleasantville, NJ
I'll try using those .npc files.

The only difference I could see is that you have 'Elliot' shot immediately and I keep him. If I have no other options and it proves to be necessary I'll have to off him as well but I will try with him still alive.


This sucks because for a while I thought I was getting somewhere with the .npcs.


We really need a better editor for these.

The unknown fields in the existing editors are many. With the code being available it seems like someone should be able to find out what those fields are at least.



EDIT


I just tried those .npc files. On the very first cutscene 'dedrianna's' picture pops up for a fraction of a second the 'elliot' says his line then when it goes back to d there is a dialouge box next to her protrait but 'she' says nothing. When I click on this box I get the endless timelas.

[Updated on: Thu, 14 February 2008 22:25] by Moderator

Report message to a moderator

Sergeant Major
Re: How to make an editor?[message #175653] Thu, 14 February 2008 22:41 Go to previous messageGo to next message
the scorpion

 
Messages:1834
Registered:September 2004
Location: CH
well then you tried something not quite the way it has to be.

also you can use a different file for th eone where "elliot" is shot early on too. just rename these things.

Report message to a moderator

Sergeant Major
Re: How to make an editor?[message #175654] Thu, 14 February 2008 22:47 Go to previous messageGo to next message
Khor1255 is currently offline Khor1255

 
Messages:1817
Registered:August 2003
Location: Pleasantville, NJ
Do you have any suggestions?

I looked in the editor at the first few actions. It seems the only thing you really changed was from dialouge line 10 to line 119. But I get my hangup the very first time d goes to talk (well there is also that little glitch where her portrait appears for a split second.

Of course i also need to change the shooting thing so do you have any ideas which files to change?

Report message to a moderator

Sergeant Major
Re: How to make an editor?[message #175661] Thu, 14 February 2008 23:42 Go to previous messageGo to next message
the scorpion

 
Messages:1834
Registered:September 2004
Location: CH
at the moment i'm lost at why there should be any problems at all. maybe my files are indeed not backwards compatible...

remember my table which script belongs to which person and what event in the game. If you don't want elliot to be shot at all, you use a pair of scripts where he isn't shot an replace the one (pair) where he gets shot with them.

afterwards adjust dialogue and maybe remove other unwanted stuff.


if the RR files only differ from the default files by a text line, then it might not be the correct one. You made sure you replaced both character's scripts, not just one of them?

Report message to a moderator

Sergeant Major
Re: How to make an editor?[message #175664] Fri, 15 February 2008 00:32 Go to previous messageGo to next message
Khor1255 is currently offline Khor1255

 
Messages:1817
Registered:August 2003
Location: Pleasantville, NJ
I don't remember any table. You sent me a couple of screenshots showing which lines to change but I never saw a table.

Do you think I also need to change the .npc file that corresponds to their character number or should replacing .npc160-176 be enough.

I didn't replace any other .npc files except 160-176. Could this be the problem?

Report message to a moderator

Sergeant Major
Re: How to make an editor?[message #175680] Fri, 15 February 2008 09:04 Go to previous messageGo to next message
the scorpion

 
Messages:1834
Registered:September 2004
Location: CH
this is definitly the problem

you only changed either elliot or deidranna

there ought to be corresponding npc files for the other character too. check ja2 rr's folders for npc 180-196 files. That ought to fix it... of course there might be other factors but this one looks important.

Report message to a moderator

Sergeant Major
Re: How to make an editor?[message #175683] Fri, 15 February 2008 09:40 Go to previous messageGo to next message
Khor1255 is currently offline Khor1255

 
Messages:1817
Registered:August 2003
Location: Pleasantville, NJ
O.K.

You may have mentioned the 180 - 196 files but I somehow never remember anything about them.

I have just tested it with files 170-196 included. Everything works fine except for some dialouge weirdness that I am sure i can correct.

One really weird thing is that although Elliot was shot in the first scene he is the one that delivers his lines to d the whole time. Joe walked in right after e was shot but I have not seen him since.

I think not messing with the 180-196 files may have been where my original failure to alter these routines were. There was most likely something contained in these files that was causing the lockup at the sam sites.

I hate to ask but could you either e-mail me or explain here again how I remove the slapping? I tried last night but could not even do it for one cutscene.

I still plan on using yours but it is nagging the hell out of me that although I saved the e-mails I thought explained this I cannot get it to work.

I am still hoping to get this utility down.

One nagging question is how did you find that these files pertained to Dedrianna and Elliot?

They in no way correspond to their character numbers so other than just trolling through all of the .npc files I can't see how you could have guessed that these files control these npcs?


Thanx again. I hope soon I will get a hold of this because I would like to change a few town related .npc files one day and certainly be able to adjust character actions.

Report message to a moderator

Sergeant Major
Re: How to make an editor?[message #175699] Fri, 15 February 2008 11:22 Go to previous messageGo to next message
the scorpion

 
Messages:1834
Registered:September 2004
Location: CH
i hadn't found out all by myself. Someone once back in the days explained to me that the cut scenes were actually .npc script controlled. Once i got curious, i took a look at the .slf archive and had a look at which npc files i hadn't yet known. These files were the only .npc scripts i hadn't yet knwon/ investigated, so with no other option, it must have been those. Opening some, it didn't take long to find the pattern.

see each .npc scripts equals the behaviour of one of the NPC's in question, deidranna and elliot (Joe uses his normal 079.npc script)

and the numbers correspond. 160 and 180 belong to the same cutscene, as do 161 to 181 and 176 to 196 for example

They are like couples, and when you only changed one part, it may have worked. See you can change the cutscene by only altering elliot's files so he jumps over deidranna's slaps to his own record initially *after* the slapping. But it's a thin line, there might be other actions in there that require the other script to match.

Now let's look at the "shoot elliot" problem. Yes in RR his character slot is shot in the opening seqence. Everybody that skipped it: shame on you guys ;-D

For your mod, you might want that character not to be shot at all, so i suggest you use one of the other couples of scripts for the event in question, or, you jump the shooting and have joe (here you have to jump to character 079's correct record) to appear right away or just end the cut scene before the shooting. There's many options that you have, depends on which you think fits the most.

Report message to a moderator

Sergeant Major
Re: How to make an editor?[message #175765] Sat, 16 February 2008 05:44 Go to previous messageGo to next message
Khor1255 is currently offline Khor1255

 
Messages:1817
Registered:August 2003
Location: Pleasantville, NJ
There are two parts that I am totally in the weeds about as far as .npc files are concerned.

One is the fact that there seem to be two actions sometimes contained in a single part of the .npc file in question.

For instance:

In npc file 160 record 1 it calls for speech file 10 but also calls for
Jumpto NPC 135 record 0

When you look in this record it starts with
NPC is an enemy is true

Which would lead you to believe that this makes NPC 135 an enemy of NPC 75

I know I am missing something because all I can see the script really doing is triggering a voice file. Is it possible that the same record is used for two totally different actions?

The second question ties directly to the first. What is the signifigance of the .npc files that have the same numbers as characters?

I would assume .npc file 75 pertains to d and .npc file 135 e but how? And is this always the case?


Thanx for laboring along with this. I must seem like someone with 6 fingers and a pee brain but I really NEED to know this stuff or I must scrap my storyline and make one that mirrors vanilla ja2 almost to a fault. I cannot see going on that way.

Report message to a moderator

Sergeant Major
Re: How to make an editor?[message #175945] Mon, 18 February 2008 23:07 Go to previous messageGo to next message
Khor1255 is currently offline Khor1255

 
Messages:1817
Registered:August 2003
Location: Pleasantville, NJ
I have been using scorpion's modified .npc scripts for the last week in my mod and a curious thing happens. During the first cut scene the Dedrianna character shoots 'Elliot' then Joe runs into the room and they say their bit (this is the same interaction that happens late in the game in vanilla).

I understand some copy/pasting and or renaming was most likely involved here but the part that doesn't make much sense is that in my hybridised version (where I changed nothing about the scripts because I cannot find the real trigger for the gunshot) Elliot continues to live for days after being shot and all of his dialouge is exactly the same as the unshot Elliot.

Does this make any sense to anyone?

Does anyone know which file contains the gunshot and how I might change this?


Everything else works pretty good. I conquered 'Drassen' once and did not get a cut scene for it but then got all the other ones in the right place and all so that may have been a one time glitch.

I think I am close to at least getting the cutscenes to pan out (although I still have very close to 0 understanding of how .npc scripts work). If I can remove the shooting I can proceed foreward with the voice acting part of the cutscenes at least.

Report message to a moderator

Sergeant Major
Re: How to make an editor?[message #175950] Tue, 19 February 2008 00:57 Go to previous messageGo to next message
the scorpion

 
Messages:1834
Registered:September 2004
Location: CH
Khor1255
There are two parts that I am totally in the weeds about as far as .npc files are concerned.

One is the fact that there seem to be two actions sometimes contained in a single part of the .npc file in question.

For instance:

In npc file 160 record 1 it calls for speech file 10 but also calls for
Jumpto NPC 135 record 0

When you look in this record it starts with
NPC is an enemy is true

Which would lead you to believe that this makes NPC 135 an enemy of NPC 75

I know I am missing something because all I can see the script really doing is triggering a voice file. Is it possible that the same record is used for two totally different actions?

The second question ties directly to the first. What is the signifigance of the .npc files that have the same numbers as characters?

I would assume .npc file 75 pertains to d and .npc file 135 e but how? And is this always the case?


normally, i call you names but in this above case i really don't find a way to claim it's your fault ;-D

jump to npc135 record 0 is indeed misguiding. It is only correct if it happens normally in the game, from an NPC's npc script (lol)
Whenever you find a jump to npc 135 or 75 in one of the 160+ scripts, it doesn not jump to 135.npc or 075.npc but to the correspondingly numbered .npc file

so if 160.npc sais jump to npc 075 record 0 than this means 180.NPC record 0!

and speech records are somehting entirely else, try never to confuse them, it's just a problem of naming conventions, think about it more abstractly: the npc scripts always jump to record in other .npc reords, speech is effected only in that one field where you can select speech, how many lines etc, nowehere else.

a single record of a .npc file can contain many different things to happen: they are labeled according to their slot: record is used how often/ npc has itemxy/ stands on grid z, trigger true/ false, interaction type, leadership requirement, speech output, quests fulfilled, triggers set/ true/ false, npc action.


also the "npc is an enemy" is not an action, it's a "fact", a trigger that must be true for this record to be activated. Also it doesn't make npc's hostile to each other, only towards the player.

wherever the .npc files correspond to the numbers in prof.dat, these .npc files contained most of the npc's actions, active quests, starting/ ending quests, different triggers set to true or false depending on interaction etc.

where the numbers don't correspond, it still works similarly, where the name of the .npc file points ot factions or maps, then it can make certain civ's on maps make different comments depending on active quests, loyalty ratings etc.
i never tested if actions can be triggered from generic npc's (no name) but you might want to try. Checks fro interaction types are of course not possible here.

as far as the shooting is concerned, you can just copy-paste the couple of corresponding scripts right back, it was just a switch from me, switch them back to restore something close to ja2's scripts. otherwise disable the shooting procedure the same way you disabled the slapping procedure. Search for unknwon npc actions and see if you can skip the record. Remember in this script, also joe (079.NPC) takes part, so you can jump to his action too.

Report message to a moderator

Sergeant Major
Re: How to make an editor?[message #175951] Tue, 19 February 2008 01:02 Go to previous messageGo to next message
the scorpion

 
Messages:1834
Registered:September 2004
Location: CH
oh, there are some inaccuracies. "npc is an enemy" does not make anybody hostile to the player. it's just a trigger. "NPC turns hostile" is, afair, the action that makes them actually attack you on sight.

"npc turns friendly" can reverse this (not permanently?)

another small inaccuracy, there are some npc actions that can cause speech to be triggered, but this is only the "npc is an asshole" and "npc is a nice guy" comments that can be triggered.

of course, you can design a mod where only one npc is reckoned in such positive or negativ ways and have your custom mercs use specific comments, e.g. to indicate a quest speciality about the character in question.

Report message to a moderator

Sergeant Major
Re: How to make an editor?[message #175955] Tue, 19 February 2008 01:40 Go to previous messageGo to next message
Khor1255 is currently offline Khor1255

 
Messages:1817
Registered:August 2003
Location: Pleasantville, NJ
That explains quite a bit.

Thanx man.

In this case you maybe would be right in calling me an idiot (or more accurately someone without the time to do many experiments). It should maybe have occoured to me that they were talking about the 'companion' script and not the correctly numbered one.

But this clears a lot of the fog away I think.

One of the most frustrating remaining mysteries is the unknown npc action codes.

Do you happen to know which one is the gunshot?

I am assuming it to be contained in your 160 script which maybe corresponds to a later script in vanilla. But I have forgotten how to make the jump anyway. I think it was something like substituting the action code for a jump to the corresponding .npc file and script that is supposed to follow the slap or shot but am not certain.

I will try this tonight.

I think the .npc files that correspond to character numbers are the ones that mainly govern their quest/overall storyline interaction.

Does this seem likely to you as well?

I do not think their actual actions are contained here since they seem to be contained in the event type scripts (160/180 etc). But I don't know if this is a constant or they occour in both scripts.

Believe it or not, I may be getting close to understanding how this works at least on a very rudimental level.

I wish I didn't lose those scripts that I made using the system you described for me because while I still have those e-mails I cannot reference them against the scripts I made to see what I was doing wrong.

I think I will start another thread when I find do some more testing tonight. I will almost surely have another easy question for you and feel a little bad muddying up Will's thread.

Back on topic

I think having new editors would be a great thing and this one at the moment would be the most useful for me. Since it is the least intuative of any editor I can think of an overhaul would be sweet.

Report message to a moderator

Sergeant Major
Re: How to make an editor?[message #175967] Tue, 19 February 2008 10:20 Go to previous messageGo to next message
the scorpion

 
Messages:1834
Registered:September 2004
Location: CH
i had a look at it. script 160, record 04 do you see unknown npc action 38?

that's the shooting.

however, watch out, you might have to add a new jump to the next script (npc 075 record 05) because the shooting also triggered the jump to the next record, removing the shooting might cause the script to stop. So you add this jump from record 4 to record 5 in order to keep the script running when the shooting is removed

deidranna and elliot's 075 and 135.npc scripts are almost meaningless, they mainly contain what they say when you meet them ingame, which is pretty much nothing. Deidranna has some hardcoded stuff that isn't in the script.
at least that's as far as i recall.


sorry for all the off-topic. I think once we have a new thread, parts of this can be moved there. I think most people that made these programmes have becme inactive as far as the ja2 community is concerned. However maybe some of them may still reply to e-mails?
the source code of certain programmes might be useful, but i figure the chances that they keep their very old sources are slim.

Report message to a moderator

Sergeant Major
Re: How to make an editor?[message #177876] Mon, 10 March 2008 12:26 Go to previous messageGo to next message
Kaerar is currently offline Kaerar

 
Messages:2022
Registered:January 2003
Location: Australia :D
@ Wil a good hex editor is UltraEdit-32

Report message to a moderator

Lieutenant

Re: How to make an editor?[message #177893] Mon, 10 March 2008 13:55 Go to previous messageGo to next message
Will Gates is currently offline Will Gates

 
Messages:1012
Registered:September 2006
Location: Far far away.
thanx; will the free 45 day trial download be enough or do I need to go get the thing in box from a shop?

edit: I open it all up but it's just in hex language; I need something that displays it in a form of english simultaneously; it may be there in Ultraedit but I do't know how to make it display???

[Updated on: Tue, 11 March 2008 10:57] by Moderator

Report message to a moderator

Sergeant Major
Re: How to make an editor?[message #177984] Tue, 11 March 2008 15:48 Go to previous messageGo to next message
Kaerar is currently offline Kaerar

 
Messages:2022
Registered:January 2003
Location: Australia :D
Hmmm there are a few that show it in dual panels. I used to have one, just can't remember it atm.

UE32 has the english to the right of the hex lines when you load up a savegame.

Plus its useful to learn how offsets work etc... You can see them easily on the left.

Can you understand Hexadecimal? Its just decimal with the letters A-F added on meaning 10-15.

Report message to a moderator

Lieutenant

Re: How to make an editor?[message #177998] Tue, 11 March 2008 16:51 Go to previous message
Will Gates is currently offline Will Gates

 
Messages:1012
Registered:September 2006
Location: Far far away.
thanx for the help. i see i will have to learn this properly some time. for now really i should concentrate on the mod things i can do like maps and such; leave this mind boggling nasty to others!

Report message to a moderator

Sergeant Major
Previous Topic: Request : creating own custom weapon/item tutorial
Next Topic: JA2 ->JA2 Gold
Goto Forum:
  


Current Time: Thu Mar 28 10:45:21 GMT+2 2024

Total time taken to generate the page: 0.01682 seconds