Home » SIRTECH CLASSICS » Jagged Alliance: Unfinished Business » Tools and Guides Repository (Archive) » Info on character types focus RPC and EPC
Info on character types focus RPC and EPC[message #188419]
||Thu, 12 June 2008 13:52 |
||the following is going to be an untechnical, simple terms overview of what kind of characters are available for modmaking, what are their differences and what causes which difference and limitation
this is as far as my own research goes, whoever knows better/ more accurately can inform me of necessary corrections.
Most is tested though, however the conclusions i draw may still be speculative and the logic i use may not be the logic of the code, but, as far as a modmaker does the same things i did, he'll have the same results.
The first and most general distinction of character types is the classic PC/ NPC distinction
that difference appears to be such that it is hardcoded, there's enumerations of which slots can be PC (player controlled) and which can't. Additionally, NPC slots have no coordinates for the 48x43 face that would be used if they were on the team, while all PC's either have these coords in prof.dat or in a table located in the exe/ sourcecode (see my other thread for more info on that)
Of course that distinction is blurred by EPC's and RPC's that are both, NPC or PC depending on what point in time you look at them. I consider them PC's in the following comments simply because the CAN be player controlled, which is the key point about that npc/ pc distinction
PC's can be IMP's, MERC, AIM mercenaries as well as RPC's and EPC's.
- not into the above categories fall the traders. They are hardcoded to their slots, usually they are NPC slots, yet also two RPC slots (61 and 74 IIRC) are traders. Traders can also be traded while they're on the team (in case of the RPC slots)
IMP's have their own, distinct behaviour, but they fall out of interest for modmaking because they are mostly defined only after startup of the game.
AIM and MERC characters are limited for modmaking as they are never NPC and have their only storybackgrund in a few lines of BIO. How to mod these "simple" characters is commonly known so this posting will mostly refer to the remaning character types: RPC's/ EPC's (you'll shortly see that that distinction is unclean)
The disntinction who goes to AIM and MERC as well as the IMP slots are hardcoded, yet the distinction RPC/ EPC is by far more interesting.
Whether a character is an EPC or an RPC depends on several conditions:
The NPC script by which he joins the team primarily and also the bodytype defined in prof.dat
So rather than a character type sui generis, the EPC seems to be an RPC with special, slot-related attributes (can have his script activated when player controlled) and a script-triggered, distinct behaviour (can't fight, grab items, interact, etc.)
Yes it's basicly that simple, but there are some more details that need sorting out:
RPC on an EPC slot:
You *can* make any EPC an RPC!!! (see the condtions above). However you get a limitation, as characters, that are used as EPC's in the vanilla game lack certain values in prof.dat, for example need for sleep, reputation tolerance, and, most importantly, the modifiers to NPC interaction
It appears that when you hire an EPC as RPC (he can then do all the fighting, militia traning, npc interacting just like any Merc!) these missing values are reset to default values of some sorts. This results in a MERC who has no need for sleep values still needing sleep just normally, as the default value to which the game defaults appears to be not 0
a different story are the npc interactions: there, the game seem to default to 0 for the missing data, which means your RPC on an EPC slot *can* interact with NPC's, but will have awful difficulties of activating any quests or get any info from an NPC even if you assign him very high leadership scores.
This is apparently the only limitation of using a (vanilla game) EPC as RPC
Use them as fighters and you're fine.
this for example also allows to first escort a character like Joy, John Kulba, Skyrider, Mary, Maria all the head miners and after the escorting part, hire them as fighting characters!
you just need to have a fighting bodytype and a script that first escorts, then later hires, which is pretty simple to do in most cases. This also clearly shows that the special behaviour of EPC's is slot-related, while the ability to become an RPC is also possible for EPC's (these two functions are not mutually exclusive if timed after each another, the one way that makes sense)
i may write more about the special characters like skyrider or the miners. Especially skyrider is of interest. Did you ever know his chopper works totally without skyrider?
EPC on an RPC slot:
A more serious problem appears to be having an EPC on an RPC slot (slots 57-74)
EPC slots, and by this i mean hardcoded every vanilla game EPC slot plus the head miners, have the unique ability that they are the only PC's whose script can be activated even when they are player controlled (in the player's party)
This is of course necessary, otherwise, they could never end their escorts, e.g. when reaching drassen airport, when talking to angel, when reaching Martha
The game designers probably wanted to prevent bugs when a script of an RPC would be mistakenly activated when his on the team (not that vanilla ja2's RPC's have a lot of convoluted scripts or such, but anyway) and i guess this is why RPC slots (again, 57-74) don't have that ability of having their scripts activated when player controlled.
*the above is only partly tested. Does anybody remember what happens if you bring dynamo to matt, bring shank to Jake in the vanilla game? does a jump to their scripts happen? or do the NPC's all of the talking?*
Anyway, according to my tests, if you make an RPC slot an EPC, you seemingly can't make him be unescorted by script. What might work is to manually unescort them, but this is of course unelegant.
so what are the conclusions to be drawn:
1. There are several more character slots that can be made fully playable. Prime examples are Skyrider or Joey or even John. I tested the latter with the files of UB and what do you know, it works very well expect for the NPC interaction, but which gamer in his right mind would use a simpleton likeJohn kulba to his negotiations anyway.
(of course if the default of 0 could in the code be changed to an arbitrary default values else than 0, these slots would then become fully playable)
So once joey served his purpose to be brought back to his mother, he could decide to sneak out of the house and ask the player to join the team.
So once skyirder has activated the chopper in drassen, he could then decide flying the bird is too dangerous, rather become a mechanic for the team (and doing some occasional fighting) ;-D
or John, especially if Mary dies or some other condition, could decide not to mount the plane but fight on the player's side.
That's the vanilla game. In every non-vanilla game using other characters, you're free anyway.
2. There's some specialities concerning the EPC slots and the Miners, Matt... a treasure cove for new ideas. Did you for example know that Matt is the only miner that can activate his Mine from within a different sector? the other miners, they can only activate the mining income from the sector they physicly are in, while Matt is hardcoded to activate alma Mine, regardless of whether he is in a different sector alltogether.
EPC slots can apparently have their scripts activated even if they are not in the sector in question! So you can have an EPC that is in a different sector make comments about things in the one sector your squad is in now.
i have only scratched the surface of above treasure cove. I hope some people find the time to some more in-depth research and also see the kind of creativity that is possible given the above implications. EPC's can become narrators, skyrdier's chopper can be used without him (that's a truly silent skyrider then, lol), Matt can activate "his" Mine from a distance, Miners can be escorted or recruited, etc.
Current Time: Wed Feb 20 09:36:54 EET 2019
Total time taken to generate the page: 0.00682 seconds