-
Posts
15 -
Joined
-
Last visited
Content Type
Profiles
News Articles
Tutorials
Forums
Downloads
Everything posted by Kabay
-
All characters disapear ingame after modification on SPLibrary
Kabay replied to Kabay's topic in Coding and Scripts
Thanks for your response, I will check that ! And sorry for not giving much news about this problem, but my computer broke and I have to reinstall all my softwares, so i'm a little stuck at this moment. You will have new soon ! -
All characters disapear ingame after modification on SPLibrary
Kabay replied to Kabay's topic in Coding and Scripts
Ok, no problem, thank you for your time ! I think it may come from the new openJk versions because on the older version i created a Force Freeze power without problems, and i recently went back to JKA coding after not touching it for few mounth, so I downloaded the new OpenJK version and tried to add a power in order to remember how to code in JKA, and I had the same problem. In this momentI thought it was my bad because I wanted to go fast, but this time i re-writed the code above at least 4-5 times and always had this problem ! I think I will re-download the OpenJK current version in order to test adding new force power in an empty project, without any code added and therefore It will show if the problem come from code added in the ECM project or from the Open JK Version. So I will do it and tell here if the problem is still here. But if someone else here is reading this topic and managed to add powers in new OpenJK versions without code problem I would want to know how he/she did it :3 I keep you informed about the problem then -
All characters disapear ingame after modification on SPLibrary
Kabay replied to Kabay's topic in Coding and Scripts
Sure ! I forgot to say that actually the code to add the power works because i can find it in the list of powers when i tape "SetForceAll 1138" in the command console. The only problem is that all the characters models disapear. q_shared.h I added here the power "FP_FREEZE" to the power enum and to the GENCMD enum typedef enum { FP_FIRST = 0,//marker FP_HEAL = 0,//instant FP_LEVITATION,//hold/duration FP_SPEED,//duration FP_PUSH,//hold/duration FP_PULL,//hold/duration FP_TELEPATHY,//instant FP_GRIP,//hold/duration FP_LIGHTNING,//hold/duration FP_SABERTHROW, FP_SABER_DEFENSE, FP_SABER_OFFENSE, //new Jedi Academy powers FP_RAGE,//duration - speed, invincibility and extra damage for short period, drains your health and leaves you weak and slow afterwards. FP_PROTECT,//duration - protect against physical/energy (level 1 stops blaster/energy bolts, level 2 stops projectiles, level 3 protects against explosions) FP_ABSORB,//duration - protect against dark force powers (grip, lightning, drain - maybe push/pull, too?) FP_DRAIN,//hold/duration - drain force power for health FP_SEE,//duration - detect/see hidden enemies FP_FREEZE, //duration - freeze ennemies NUM_FORCE_POWERS } forcePowers_t; typedef enum { GENCMD_FORCE_HEAL = 1, GENCMD_FORCE_SPEED, GENCMD_FORCE_THROW, GENCMD_FORCE_PULL, GENCMD_FORCE_DISTRACT, GENCMD_FORCE_GRIP, GENCMD_FORCE_LIGHTNING, GENCMD_FORCE_RAGE, GENCMD_FORCE_PROTECT, GENCMD_FORCE_ABSORB, GENCMD_FORCE_DRAIN, GENCMD_FORCE_SEEING, GENCMD_FORCE_FREEZE, } genCmds_t; g_active.cpp I Added ForceFreeze extern void reference to the list then added in the switch case trigering its method from GENCMD Selected extern qboolean ForceDrain2(gentity_t *ent); extern void ForceGrip(gentity_t *ent); extern void ForceLightning(gentity_t *ent); extern void ForceProtect(gentity_t *ent); extern void ForceRage(gentity_t *ent); extern void ForceSeeing(gentity_t *ent); extern void ForceTelepathy(gentity_t *ent); extern void ForceAbsorb(gentity_t *ent); extern void ForceHeal(gentity_t *ent); extern void ForceFreeze(gentity_t *ent); static void ProcessGenericCmd(gentity_t *ent, byte cmd) { switch(cmd) { default: break; case GENCMD_FORCE_HEAL: ForceHeal( ent ); break; case GENCMD_FORCE_SPEED: ForceSpeed( ent ); break; case GENCMD_FORCE_THROW: ForceThrow(ent, qfalse); break; case GENCMD_FORCE_PULL: ForceThrow(ent, qtrue); break; case GENCMD_FORCE_DISTRACT: ForceTelepathy(ent); break; case GENCMD_FORCE_GRIP: ForceGrip(ent); break; case GENCMD_FORCE_LIGHTNING: ForceLightning(ent); break; case GENCMD_FORCE_RAGE: ForceRage(ent); break; case GENCMD_FORCE_PROTECT: ForceProtect(ent); break; case GENCMD_FORCE_ABSORB: ForceAbsorb(ent); break; case GENCMD_FORCE_DRAIN: ForceDrain2( ent ); break; case GENCMD_FORCE_SEEING: ForceSeeing(ent); break; case GENCMD_FORCE_FREEZE: ForceFreeze(ent); break; } } g_itemload.cpp I added the power to the available items in g_itemload.cpp [...]else if (!Q_stricmp(tokenStr,"FP_GRIP")) { tag = FP_GRIP; } else if (!Q_stricmp(tokenStr,"FP_LIGHTNING")) { tag = FP_LIGHTNING; } else if (!Q_stricmp(tokenStr, "FP_FREEZE")) { tag = FP_FREEZE; }[...]q3_interface.h I Added SetForceFreeze and SetForceFreezeLevel in Q3_Interface.cpp SET_NO_PVS_CULL,//## %t="BOOL_TYPES" # This entity will *always* be drawn - use only for special case cinematic NPCs that have anims that cover multiple rooms!!! SET_CLOAK, //## %t="BOOL_TYPES" # Set a Saboteur to cloak (true) or un-cloak (false). SET_FORCE_HEAL,//## %t="BOOL_TYPES" # Causes this ent to start force healing at whatever level of force heal they have SET_FORCE_SPEED,//## %t="BOOL_TYPES" # Causes this ent to start force speeding at whatever level of force speed they have (may not do anything for NPCs?) SET_FORCE_PUSH,//## %t="BOOL_TYPES" # Causes this ent to do a force push at whatever level of force push they have - will not fail SET_FORCE_PUSH_FAKE,//## %t="BOOL_TYPES" # Causes this ent to do a force push anim, sound and effect, will not push anything SET_FORCE_PULL,//## %t="BOOL_TYPES" # Causes this ent to do a force push at whatever level of force push they have - will not fail SET_FORCE_MIND_TRICK,//## %t="BOOL_TYPES" # Causes this ent to do a jedi mind trick at whatever level of mind trick they have (may not do anything for NPCs?) SET_FORCE_FREEZE, //FORCE FREEZE SET_FORCE_HEAL_LEVEL,//## %t="FORCE_LEVELS" # Change force power level SET_FORCE_JUMP_LEVEL,//## %t="FORCE_LEVELS" # Change force power level SET_FORCE_SPEED_LEVEL,//## %t="FORCE_LEVELS" # Change force power level SET_FORCE_PUSH_LEVEL,//## %t="FORCE_LEVELS" # Change force power level SET_FORCE_PULL_LEVEL,//## %t="FORCE_LEVELS" # Change force power level SET_FORCE_MINDTRICK_LEVEL,//## %t="FORCE_LEVELS" # Change force power level SET_FORCE_FREEZE_LEVEL, q3_interface.cpp I added the Icarus command next to the other powers in the switch case case SET_FORCE_HEAL: Q3_SetForcePower( entID, FP_HEAL, (qboolean)(Q_stricmp("true",(char*)data)==0) ); break; case SET_FORCE_SPEED: Q3_SetForcePower( entID, FP_SPEED, (qboolean)(Q_stricmp("true",(char*)data)==0) ); break; case SET_FORCE_PUSH: Q3_SetForcePower( entID, FP_PUSH, (qboolean)(Q_stricmp("true",(char*)data)==0) ); break; case SET_FORCE_PUSH_FAKE: ForceThrow( &g_entities[entID], qfalse, qtrue ); break; case SET_FORCE_PULL: Q3_SetForcePower( entID, FP_PULL, (qboolean)(Q_stricmp("true",(char*)data)==0) ); break; case SET_FORCE_MIND_TRICK: Q3_SetForcePower( entID, FP_TELEPATHY, (qboolean)(Q_stricmp("true",(char*)data)==0) ); break; case SET_FORCE_GRIP: Q3_SetForcePower( entID, FP_GRIP, (qboolean)(Q_stricmp("true",(char*)data)==0) ); break; case SET_FORCE_LIGHTNING: Q3_SetForcePower( entID, FP_LIGHTNING, (qboolean)(Q_stricmp("true",(char*)data)==0) ); break; case SET_FORCE_FREEZE: Q3_SetForcePower(entID, FP_FREEZE, (qboolean)(Q_stricmp("true", (char*)data) == 0)); break; npc_stats.cpp I made the power usable by the NPC adding it in the table of powers stringID_table_t FPTable[] = { ENUM2STRING(FP_HEAL), ENUM2STRING(FP_LEVITATION), ENUM2STRING(FP_SPEED), ENUM2STRING(FP_PUSH), ENUM2STRING(FP_PULL), ENUM2STRING(FP_TELEPATHY), ENUM2STRING(FP_GRIP), ENUM2STRING(FP_LIGHTNING), ENUM2STRING(FP_SABERTHROW), ENUM2STRING(FP_SABER_DEFENSE), ENUM2STRING(FP_SABER_OFFENSE), //new Jedi Academy powers ENUM2STRING(FP_RAGE), ENUM2STRING(FP_PROTECT), ENUM2STRING(FP_ABSORB), ENUM2STRING(FP_DRAIN), ENUM2STRING(FP_SEE), //EPIC CHALLENGE MOD IV POWERS ENUM2STRING(FP_FREEZE), { "", -1 } }; g_target.cpp I added the power in list in order to make it appear in the power choice in the begining of a mission : gi.cvar_set("ui_stats_absorb", va("%d",client->sess.missionStats.forceUsed[FP_ABSORB])); gi.cvar_set("ui_stats_heal", va("%d",client->sess.missionStats.forceUsed[FP_HEAL])); gi.cvar_set("ui_stats_mindtrick", va("%d",client->sess.missionStats.forceUsed[FP_TELEPATHY])); gi.cvar_set("ui_stats_protect", va("%d",client->sess.missionStats.forceUsed[FP_PROTECT])); gi.cvar_set("ui_stats_jump", va("%d",client->sess.missionStats.forceUsed[FP_LEVITATION])); gi.cvar_set("ui_stats_pull", va("%d",client->sess.missionStats.forceUsed[FP_PULL])); gi.cvar_set("ui_stats_push", va("%d",client->sess.missionStats.forceUsed[FP_PUSH])); gi.cvar_set("ui_stats_sense", va("%d",client->sess.missionStats.forceUsed[FP_SEE])); gi.cvar_set("ui_stats_speed", va("%d",client->sess.missionStats.forceUsed[FP_SPEED])); gi.cvar_set("ui_stats_defense", va("%d",client->sess.missionStats.forceUsed[FP_SABER_DEFENSE])); gi.cvar_set("ui_stats_offense", va("%d",client->sess.missionStats.forceUsed[FP_SABER_OFFENSE])); gi.cvar_set("ui_stats_throw", va("%d",client->sess.missionStats.forceUsed[FP_SABERTHROW])); gi.cvar_set("ui_stats_drain", va("%d",client->sess.missionStats.forceUsed[FP_DRAIN])); gi.cvar_set("ui_stats_grip", va("%d",client->sess.missionStats.forceUsed[FP_GRIP])); gi.cvar_set("ui_stats_lightning", va("%d",client->sess.missionStats.forceUsed[FP_LIGHTNING])); gi.cvar_set("ui_stats_rage", va("%d",client->sess.missionStats.forceUsed[FP_RAGE])); gi.cvar_set("ui_stats_freeze", va("%d", client->sess.missionStats.forceUsed[FP_FREEZE])); g_svcmds.cpp I added here the command line to the cmd table to have the power in cheat commands : SetForceCmd SetForceTable[NUM_FORCE_POWERS] = { { "forceHeal", "setForceHeal", FORCE_LEVEL_3 }, { "forceJump", "setForceJump", FORCE_LEVEL_3 }, { "forceSpeed", "setForceSpeed", FORCE_LEVEL_3 }, { "forcePush", "setForcePush", FORCE_LEVEL_3 }, { "forcePull", "setForcePull", FORCE_LEVEL_3 }, { "forceMindTrick", "setForceMindTrick", FORCE_LEVEL_4 }, { "forceGrip", "setForceGrip", FORCE_LEVEL_3 }, { "forceLightning", "setForceLightning", FORCE_LEVEL_3 }, { "saberThrow", "setSaberThrow", FORCE_LEVEL_3 }, { "saberDefense", "setSaberDefense", FORCE_LEVEL_3 }, { "saberOffense", "setSaberOffense", SS_NUM_SABER_STYLES-1 }, { "forceRage", "setForceRage", FORCE_LEVEL_3 }, { "forceProtect", "setForceProtect", FORCE_LEVEL_3 }, { "forceAbsorb", "setForceAbsorb", FORCE_LEVEL_3 }, { "forceDrain", "setForceDrain", FORCE_LEVEL_3 }, { "forceSight", "setForceSight", FORCE_LEVEL_3 }, { "forceFreeze", "setForceFreeze", FORCE_LEVEL_3 }, };cg_local.h I modified the max Powers and powers to show (MAX_SHOWPOWERS from 12 to 13 and MAX_DPSHOPOWERS from 16 to 17) #define MAX_SHOWPOWERS 13 extern int showPowers[MAX_SHOWPOWERS]; extern const char *showPowersName[MAX_SHOWPOWERS]; extern int force_icons[NUM_FORCE_POWERS]; #define MAX_DPSHOWPOWERS 17 cg_main.cpp I gave an icon to the power ( i chose temporarly the push icon) const char *force_icon_files[NUM_FORCE_POWERS] = {//icons matching enums forcePowers_t "gfx/mp/f_icon_lt_heal", //FP_HEAL, "gfx/mp/f_icon_levitation", //FP_LEVITATION, "gfx/mp/f_icon_speed", //FP_SPEED, "gfx/mp/f_icon_push", //FP_PUSH, "gfx/mp/f_icon_pull", //FP_PULL, "gfx/mp/f_icon_lt_telepathy", //FP_TELEPATHY, "gfx/mp/f_icon_dk_grip", //FP_GRIP, "gfx/mp/f_icon_dk_l1", //FP_LIGHTNING, "gfx/mp/f_icon_saber_throw", //FP_SABERTHROW "gfx/mp/f_icon_saber_defend", //FP_SABERDEFEND, "gfx/mp/f_icon_saber_attack", //FP_SABERATTACK, "gfx/mp/f_icon_dk_rage", //FP_RAGE, "gfx/mp/f_icon_lt_protect", //FP_PROTECT, "gfx/mp/f_icon_lt_absorb", //FP_ABSORB, "gfx/mp/f_icon_dk_drain", //FP_DRAIN, "gfx/mp/f_icon_sight", //FP_SEE, "gfx/mp/f_icon_dk_grip", //FP_FREEZE, };I added the powers to the showpowers table int showPowers[MAX_SHOWPOWERS] = { FP_ABSORB, FP_HEAL, FP_PROTECT, FP_TELEPATHY, FP_SPEED, FP_PUSH, FP_PULL, FP_SEE, FP_DRAIN, FP_LIGHTNING, FP_RAGE, FP_GRIP, FP_FREEZE, };I added the name in "Showpowersname" const char *showPowersName[MAX_SHOWPOWERS] = { "SP_INGAME_ABSORB2", "SP_INGAME_HEAL2", "SP_INGAME_PROTECT2", "SP_INGAME_MINDTRICK2", "SP_INGAME_SPEED2", "SP_INGAME_PUSH2", "SP_INGAME_PULL2", "SP_INGAME_SEEING2", "SP_INGAME_DRAIN2", "SP_INGAME_LIGHTNING2", "SP_INGAME_DARK_RAGE2", "SP_INGAME_GRIP2", "SP_INGAME_FREEZE2", };I added it in showdatapadpowers int showDataPadPowers[MAX_DPSHOWPOWERS] = { // Light side FP_ABSORB, FP_HEAL, FP_PROTECT, FP_TELEPATHY, // Core Powers FP_LEVITATION, FP_SPEED, FP_PUSH, FP_PULL, FP_SABERTHROW, FP_SABER_DEFENSE, FP_SABER_OFFENSE, FP_SEE, //Dark Side FP_DRAIN, FP_LIGHTNING, FP_RAGE, FP_GRIP, FP_FREEZE, };I added it in showpowersdesc const char *forcepowerDesc[NUM_FORCE_POWERS] = { "FORCE_ABSORB_DESC", "FORCE_HEAL_DESC", "FORCE_PROTECT_DESC", "FORCE_MIND_TRICK_DESC", "FORCE_JUMP_DESC", "FORCE_SPEED_DESC", "FORCE_PUSH_DESC", "FORCE_PULL_DESC", "FORCE_SABER_THROW_DESC", "FORCE_SABER_DEFENSE_DESC", "FORCE_SABER_OFFENSE_DESC", "FORCE_SENSE_DESC", "FORCE_DRAIN_DESC", "FORCE_LIGHTNING_DESC", "FORCE_RAGE_DESC", "FORCE_GRIP_DESC", "FORCE_FREEZE_DESC", };And also added the powers 1,2 and 3 desc const char *forcepowerLvl1Desc[NUM_FORCE_POWERS] = { "FORCE_ABSORB_LVL1_DESC", "FORCE_HEAL_LVL1_DESC", "FORCE_PROTECT_LVL1_DESC", "FORCE_MIND_TRICK_LVL1_DESC", "FORCE_JUMP_LVL1_DESC", "FORCE_SPEED_LVL1_DESC", "FORCE_PUSH_LVL1_DESC", "FORCE_PULL_LVL1_DESC", "FORCE_SABER_THROW_LVL1_DESC", "FORCE_SABER_DEFENSE_LVL1_DESC", "FORCE_SABER_OFFENSE_LVL1_DESC", "FORCE_SENSE_LVL1_DESC", "FORCE_DRAIN_LVL1_DESC", "FORCE_LIGHTNING_LVL1_DESC", "FORCE_RAGE_LVL1_DESC", "FORCE_GRIP_LVL1_DESC", "FORCE_FREEZE_LVL1_DESC", }; const char *forcepowerLvl2Desc[NUM_FORCE_POWERS] = { "FORCE_ABSORB_LVL2_DESC", "FORCE_HEAL_LVL2_DESC", "FORCE_PROTECT_LVL2_DESC", "FORCE_MIND_TRICK_LVL2_DESC", "FORCE_JUMP_LVL2_DESC", "FORCE_SPEED_LVL2_DESC", "FORCE_PUSH_LVL2_DESC", "FORCE_PULL_LVL2_DESC", "FORCE_SABER_THROW_LVL2_DESC", "FORCE_SABER_DEFENSE_LVL2_DESC", "FORCE_SABER_OFFENSE_LVL2_DESC", "FORCE_SENSE_LVL2_DESC", "FORCE_DRAIN_LVL2_DESC", "FORCE_LIGHTNING_LVL2_DESC", "FORCE_RAGE_LVL2_DESC", "FORCE_GRIP_LVL2_DESC", "FORCE_FREEZE_LVL2_DESC", }; const char *forcepowerLvl3Desc[NUM_FORCE_POWERS] = { "FORCE_ABSORB_LVL3_DESC", "FORCE_HEAL_LVL3_DESC", "FORCE_PROTECT_LVL3_DESC", "FORCE_MIND_TRICK_LVL3_DESC", "FORCE_JUMP_LVL3_DESC", "FORCE_SPEED_LVL3_DESC", "FORCE_PUSH_LVL3_DESC", "FORCE_PULL_LVL3_DESC", "FORCE_SABER_THROW_LVL3_DESC", "FORCE_SABER_DEFENSE_LVL3_DESC", "FORCE_SABER_OFFENSE_LVL3_DESC", "FORCE_SENSE_LVL3_DESC", "FORCE_DRAIN_LVL3_DESC", "FORCE_LIGHTNING_LVL3_DESC", "FORCE_RAGE_LVL3_DESC", "FORCE_GRIP_LVL3_DESC", "FORCE_FREEZE_LVL3_DESC", }; cg_infos.cpp I added the power to the list in showloaspowersname const char *showLoadPowersName[] = { "SP_INGAME_HEAL2", "SP_INGAME_JUMP2", "SP_INGAME_SPEED2", "SP_INGAME_PUSH2", "SP_INGAME_PULL2", "SP_INGAME_MINDTRICK2", "SP_INGAME_GRIP2", "SP_INGAME_LIGHTNING2", "SP_INGAME_SABER_THROW2", "SP_INGAME_SABER_OFFENSE2", "SP_INGAME_SABER_DEFENSE2", "SP_INGAME_FREEZE2", NULL, };bg_pmove.cpp I added the extern void and the trigger to the method of the power in PM_CheckForceButton extern void ForceHeal( gentity_t *self ); extern void ForceTelepathy( gentity_t *self ); extern void ForceRage( gentity_t *self ); extern void ForceProtect( gentity_t *self ); extern void ForceAbsorb( gentity_t *self ); extern void ForceSeeing( gentity_t *self ); extern void ForceFreeze(gentity_t *self); void PM_CheckForceUseButton( gentity_t *ent, usercmd_t *ucmd ) { if ( !ent ) { return; } if ( ucmd->buttons & BUTTON_USE_FORCE ) { if (!(ent->client->ps.pm_flags & PMF_USEFORCE_HELD)) { //impulse one shot switch ( showPowers[cg.forcepowerSelect] ) { case FP_HEAL: ForceHeal( ent ); break; case FP_SPEED: ForceSpeed( ent ); break; case FP_PUSH: ForceThrow( ent, qfalse ); break; case FP_PULL: ForceThrow( ent, qtrue ); break; case FP_TELEPATHY: ForceTelepathy( ent ); break; // Added 01/20/03 by AReis. // New Jedi Academy powers. case FP_RAGE: //duration - speed, invincibility and extra damage for short period, drains your health and leaves you weak and slow afterwards. ForceRage( ent ); break; case FP_PROTECT: //duration - protect against physical/energy (level 1 stops blaster/energy bolts, level 2 stops projectiles, level 3 protects against explosions) ForceProtect( ent ); break; case FP_ABSORB: //duration - protect against dark force powers (grip, lightning, drain - maybe push/pull, too?) ForceAbsorb( ent ); break; case FP_SEE: //duration - detect/see hidden enemies ForceSeeing( ent ); break; case FP_FREEZE: ForceFreeze(ent); break; } }wp_saber.cpp I defined the power as a DARK power int forcePowerDarkLight[NUM_FORCE_POWERS] = //0 == neutral { //nothing should be usable at rank 0.. FORCE_LIGHTSIDE,//FP_HEAL,//instant 0,//FP_LEVITATION,//hold/duration 0,//FP_SPEED,//duration 0,//FP_PUSH,//hold/duration 0,//FP_PULL,//hold/duration FORCE_LIGHTSIDE,//FP_TELEPATHY,//instant FORCE_DARKSIDE,//FP_GRIP,//hold/duration FORCE_DARKSIDE,//FP_LIGHTNING,//hold/duration 0,//FP_SABERATTACK, 0,//FP_SABERDEFEND, 0,//FP_SABERTHROW, //new Jedi Academy powers FORCE_DARKSIDE,//FP_RAGE,//duration FORCE_LIGHTSIDE,//FP_PROTECT,//duration FORCE_LIGHTSIDE,//FP_ABSORB,//duration FORCE_DARKSIDE,//FP_DRAIN,//hold/duration 0,//FP_SEE,//duration FORCE_DARKSIDE, //FP_FREEZE // Duration //NUM_FORCE_POWERS }; i set the powers needed for this power to 30 int forcePowerNeeded[NUM_FORCE_POWERS] = { 0,//FP_HEAL,//instant 10,//FP_LEVITATION,//hold/duration 50,//FP_SPEED,//duration 15,//FP_PUSH,//hold/duration 15,//FP_PULL,//hold/duration 20,//FP_TELEPATHY,//instant 1,//FP_GRIP,//hold/duration - FIXME: 30? 1,//FP_LIGHTNING,//hold/duration 20,//FP_SABERTHROW, 1,//FP_SABER_DEFENSE, 0,//FP_SABER_OFFENSE, //new Jedi Academy powers 50,//FP_RAGE,//duration - speed, invincibility and extra damage for short period, drains your health and leaves you weak and slow afterwards. 30,//FP_PROTECT,//duration - protect against physical/energy (level 1 stops blaster/energy bolts, level 2 stops projectiles, level 3 protects against explosions) 30,//FP_ABSORB,//duration - protect against dark force powers (grip, lightning, drain) 1,//FP_DRAIN,//hold/duration - drain force power for health 20,//FP_SEE,//duration - detect/see hidden 30 // FP_FREEZE //NUM_FORCE_POWERS }; I chose the times of freezing according to the power level int freezeTime[NUM_FORCE_POWER_LEVELS] = { 0,//none 10000,//5000, 15000,//10000, 30000//15000 };and i added the method for the power effect ( currently empty) void ForceFreeze(gentity_t *self) { } cg_local.h I modified the max Powers and powers to show (MAX_SHOWPOWERS from 12 to 13 and MAX_DPSHOPOWERS from 16 to 17) #define MAX_SHOWPOWERS 13 extern int showPowers[MAX_SHOWPOWERS]; extern const char *showPowersName[MAX_SHOWPOWERS]; extern int force_icons[NUM_FORCE_POWERS]; #define MAX_DPSHOWPOWERS 17 -
Hi ! I recently joined RJA to help him with Epic Challenge Mod IV. My part of the job is to code the new powers and add it to the modification already done. I took the code in my computer with the modification of Asgarath who added new weapons and new sabercolor which worked great when i tried to compile it. Then I tried to add powers following the tutorial of Asgarath "How to add force power for Single Player", and after these modification if i put the jagamex64.dll in the gamedata/base folder, all characters in game disapear (I still hear the song, i can use the UI, moove my player, but the characters models are gone). After the last time it worked, i touched these files : q_shared.hg_active.cppg_itemload.cppq3_interface.hq3_interface.cppnpc_stats.cppg_target.cppg_svcmds.cppcg_main.cppcg_local.hcg_info.cppbg_pmove.cppwp_saber.cpp So my question is : What ot these modification could have cause this problem ? Thank you in advance for my help, and ask me if you want more informations about this problem Regards !
-
Oh, right ! I will look for a better solution then, if it work like that I think it should not be complicated to do it in other way ^^ At least I was able to test some basic scripting in MP, but I think for the beginning I will focus on SinglePlayer mode to train myself in JKA scripting ! Thank you again for your help !
-
Thank you Eezstreet ! Thanks to what you just said I finally made the MP mod working ! I zipped the 3 main MP dll's in a pk3 file, then I loaded the mod from the game in the list of mods and it worked ! Now I can discover the pleasures of modding JKA ! Thanks to each of you who helped me !
-
Thank you again ! This explanation is really clear, I now understand a little better how the game is built ! Its already that ! For this try i compiled a Multiplayer version, but since my last message, I also compiled a single version and this one worked without problem (I also added a new force power like in one of the tutos in the forum and it worked too). Then I tried another build with both MP and SP and in this one, SP work but MP still saying the same error message. So, the problem appear only with MP versions with this error message about "Ghoul2". Maybe I built bad with Cmake in the begining ? (although I took everything about MP in the configuration). About the missing files, its normal that the SP exe is not here, because in the version I took aboutin my previous message, I built MP only, but about the MP dll missing, when I build a Release for MP-only I only have these : cgamex86.dlljampgamex86.dllopenjk.x86.exeopenjkded.x86.exerd-vanilla_x86.dlluix86.dll Then I copied the "Base" folder from my original JKA game and add it in the folder with these dll, and replaced the original Dll by these in their respective places, I also add manually the missing dll"s like OpenAl32.dll, SDL2, EaxMan and IFC22. So the problem could be that some dll and files are not built by the code when I build a Release version ?
-
I think it's almost okay ! I can start JKA Multiplayer with the OpenJK.exe,but when I try to create a game I have the following error message : "Ghoul2 model was reloaded and has changed, map must be restarted". The disposition of my DLL's are now like that : Release Folder : EaxMan.dllIFC22.dllOpenAl32.dllopenjk.x86.exeopenjkded.x86.exerd-vanilla_x86.dllSDL2.dllbase folderBase folder : assets0.pk3assets1.pk3assets2.pk3cgamex86.dllgames.logjagamex86.dlljampconfig.cfgjampgamex86.dlluix86.dll
-
Thank you for your answers ! Im not currently at home so i can't test it now but I will try these solutions tomorow and keep you informed if it worked ! And to answer you Darth Futuza i took the openJk downloaded in zip from the git
-
Hi ! Like the title said, my question could look dumb, but i just began with coding with OpenJK, so please be indulgent ^^" So I followed the tuto of eezstreet which explain how to compile open JK (the tuto here : https://jkhub.org/tutorials/article/145-compiling-openjk-win32-must-read-for-new-coders/ ). I did everything in this tuto and i successfully compiled the code, one in Debug and another in Release. Now I have all my Dll's and .exe and... I don't know what to do with that. Of course, I tested some stuff, like sending all the files in my Vanilla JKA folder, and I always have something not working and I can't test if my code work in-game. So my question is : Where the .dll and .exe of my Release Folder in the build must be placed to be tested in game ? Thank you in advance
-
@@Circa , thanks ! @@Archangel35757 Thanks ! I'm currently in my 5th and final year at my IT School so I'm not really experimented yet, but I might be really interested to contribute in projects if I my skills can fit ! To sum up : Im mostly into C++, and I already worked on some video game projects and 3D simulations in Unity & Unreal Engine, I don't know OpenGL but i'm interested to learn it, and i'm someone who learn fast ^^ I will contact them soon then, and see how I can contribute !
-
Hi Jkhub ! I'm Kabay, i'm a french fan of the Jedi Knight series since earlier-2000 , and, of course, a big star wars fan since ever ! :3 I'm also a programmer, and recently having the will to create mods on Jedi Academy, I have not a precise idea of what, but I want to try some stuff on this game ^^ So i hope i could find the help I need here, and also share with people as passionate as I am