Jump to content

Allow for More New Weapons (SP)


Recommended Posts

I would like to edit the source code to add more weapons. However, I've heard that only three new weapons can be added without the game crashing because of some kind of memory limit. The Knights of the Force mod added more than three new weapons though. So, it must be possible to increase this limit? I was wondering if anyone could explain how. Thanks.

Link to comment
  • 1 month later...

I would like to edit the source code to add more weapons. However, I've heard that only three new weapons can be added without the game crashing because of some kind of memory limit. The Knights of the Force mod added more than three new weapons though. So, it must be possible to increase this limit? I was wondering if anyone could explain how. Thanks.

I'm pretty sorry and very apologies for the late of the answer. i passed the last weeks on hospital  for cure a bad infection.

i turn home only now.

On my SP weapon tutorial and eez MP weap tutorial there are info about adding new weapons but you right. there is a restriction

caused by the fact that JKA is a game designed with a 32 architecture and use a BIT FIELD for store information of weapons selectable and switchabel from player \ npc. the 33 weapon simply is not readed and fire "could'nt load item for weapon " ERROR crash.

on MB the weapons are customized by characters and NPC.

on Movie Duels SP the limit is raise up to 64 weapons, also if i had not again success to reply i was studying the problem but i never solved. 

maybe you can use the source code of this mod as base for your own project

you have 3 possiblity for go up the trouble

- rise the limit allocating weapon loading in something of different of STATS_WEAPONS.(that is the fucked incriminated function!) 

maybe using std::vector s. you need advanced C++ skill for do that.

- create like a SAB file, an external weapon library for allocate that. as work the code of JEDI KNIGHT GALAXIES.

i tryed with 1 month of code job but i failed is really too complex to reply on SP for a lonely person @-@

- on my code at moment i used a different strategy:

i assume that weapon and force powers are not more WEAP or FP, but Categories.

A weapon become a slot of weapon like GTA so one for gun one for rifle one for saber, one for grenade .

i added new strings to NPC data files that allow to to customize a weapon

for example

 

playermodel gran

weapon WP_BLASTER_PISTOL

guntype revolver

 

 

well, the model of WP_BLASTER_PISTOL of this npc, the visual effects, the weapon icon and descript9ion and the balistic are r4eplace with a revolver into the code.

in that way there is not any limit to weapon or force power addable. a NPC can have 32 different weapons and playertoo if use NPC with playermodel commnand.

that allow infinirte combintations.

rememeber to increased also the effect buffers on FXSCHEDULER.cpp

and the MAX_NPC Data size and max saber data size on your code.

Remember also to deactivate the weapons dropping of other NPCs and replacing with ammo generical dropping (like mark droids and shadowtroopers that drops metallic bolts and force crystals) or you will have trouble with weapons world models.

also, that affect the gameplay. weapons on that way should be gained as reward of quests etc, not simply take weapons dropped by foes.

(more strategical  i guess and more nice)

DLT-19 likes this
Link to comment
  • 4 weeks later...
  • 5 weeks later...

I would like to edit the source code to add more weapons. However, I've heard that only three new weapons can be added without the game crashing because of some kind of memory limit. The Knights of the Force mod added more than three new weapons though. So, it must be possible to increase this limit? I was wondering if anyone could explain how. Thanks.

 

That's a very brilliant idea! I though about the same thing long time ago (but then I was too young to know how to code) about changing weapons list and give NPCs various weapons known from movies, for example, enemies on different planets  would have different weapons sets know from movies (for example dl-18 and other blasters known from movies on Tatooine, rebels dh-17 or a280 and stormtroopers on imperial outposts would carry dlt-19 and dlt-20a instead of the clumsy heavy repeater).

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...