Jump to content

elementhttp

Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by elementhttp

  1. Hi there ! Long time no see ? This is the current pipeline: edit code in function-> compile code -> run the game -> load a save -> test modification So you can see the problem now . Any small changes to the code requires long time to test . Question is how to reduce the pipeline size (or reduce modded changes testing time ) ? Some hypothetical examples: eg1. run the game-> load a save (or map) -> edit code in function during program execution -> test modification eg2. run the game and load map in single command -> edit code in function during program execution -> test modification
  2. ------------------------------ THEORY PART ------------------------------ Every time you or NPC fire a weapon it creates new entity. Due to 32bit engine limitations there can be only X(idk exact number) amount of projectiles on the screen . If there is X+n entities on the screen game will crash ! G_spawn no free entities How to fix this ? One way is to Increase the projectile speed (so entities can be destroyed faster) Reduce the burst size or burst spacing ( keep it less then 9000 ? ) Reduce weapon range ( if missiles are slow aka matrix mode , ignore this ? ) Write 64bit engine port ? Where do i change projectile speed ? Look in file g_weapon.cpp for your weapon projectile velocity Example for BLASTER #define BLASTER_VELOCITY 7000 ------------------------------ PRACTICAL PART ------------------------------ In file NPC_combat.cpp find and edit these lines Example 1. Increasing the number of bolts per burst from 3 to 5 NPC->burstMin = bigger the value , longer the burst case WP_BLASTER: if ( ent->NPC->scriptFlags & SCF_ALT_FIRE ) { ent->NPC->aiFlags |= NPCAI_BURST_WEAPON; ent->NPC->burstMin = 5; ent->NPC->burstMean = 5; ent->NPC->burstMax = 5; if ( g_spskill->integer == 0 ) ent->NPC->burstSpacing = 250;//attack debounce else if ( g_spskill->integer == 1 ) ent->NPC->burstSpacing = 250;//attack debounce else ent->NPC->burstSpacing = 250;//attack debounce } Example 2. And another example is pistol: NPC->burstSpacing = some low value case WP_BLASTER_PISTOL: ent->NPC->aiFlags &= ~NPCAI_BURST_WEAPON; // ent->NPC->burstSpacing = 1000;//attackdebounce if ( g_spskill->integer == 0 ) ent->NPC->burstSpacing = 70;//attack debounce else if ( g_spskill->integer == 1 ) ent->NPC->burstSpacing = 55;//attack debounce else ent->NPC->burstSpacing = 50;//attack debounce break;
  3. Ty for the fast response ! Yes i new to JK hub (you can expect some noobish questions , some examples below ) 1) Is there tutorial for icarus scripting and how to apply it in single player ? this is what i found https://github.com/JACoders/OpenJK/wiki/ICARUS-Scripting 2) Coding in c++ is not a problem but how to apply it just on single player ? So far found some sdks for both sp an mp there is jedi academy sdk ( i read its buggy ) https://jkhub.org/files/file/1137-jedi-academy-sdk/ and jedi academy fixed https://jkhub.org/files/file/1180-jedi-academy-sdk-fixed/
  4. Hi there I need help in making npcs shoot faster in single player. i moded weapons.dat for WP_BLASTER to shoot faster and it works for main character but for stormtroopers who have e-11 blaster they are shooting one projectile at a time. From experimentations intelligence ,altfire attributes in npc files do not have any effect (is it hard coded somewhere ?). Any thoughts how to solve this problem ? Thanks in advance !
×
×
  • Create New...