Home » SIRTECH CLASSICS » Jagged Alliance: Unfinished Business » Vanilla Modding » Editor & more than 255 weapons (first steps)
icon11.gif  Editor & more than 255 weapons [message #359949] Thu, 07 May 2020 13:10
Billy Bones is currently offline Billy Bones
Messages:2
Registered:May 2020
Hello World.
I'm not a programmer, just a little versed. But I need your help.
If I add more than 255 weapons, the Editor freezes at the very beginning. Black screen and nothing happens. tired

Changes:

Item Types.h:
...
UINT16 UbClassIndex;
...

#define FIRST_WEAPON 1
#define FIRST_AMMO (FIRST_WEAPON + 257)
#define FIRST_EXPLOSIVE (FIRST_AMMO + 60)
#define FIRST_ARMOUR (FIRST_EXPLOSIVE + 30)
#define FIRST_MISC (FIRST_ARMOUR + 40)
#define FIRST_KEY (FIRST_MISC + 70)

Items.c:
...
{IC_GUN, 257, TARGETCURS, CONDBUL, ...

Weapons.c
...
Added required number of lines


But if I do #define FIRST_AMMO (FIRST_WEAPON + 255) with the corresponding changes, then the Editor
works fine.
What am I doing wrong?

Report message to a moderator

Civilian
Previous Topic: Beginner steps
Next Topic: Licence/Legal Issues
Goto Forum:
  


Current Time: Sat Nov 30 11:09:56 GMT+2 2024

Total time taken to generate the page: 0.00819 seconds