I just have no clue. Someone help me with this code, plz!! -1 reply

Please wait...

Jedi_Mediator

The Force is my Guide

50 XP

3rd August 2005

0 Uploads

280 Posts

0 Threads

#1 14 years ago

I have no clue how to work these scripts and codes into the game, so I'm requesting a mod: Can someone plz change all bullet speeds of guns to a realistic speed, like the speed a bullet in real life would travel? thx I think the speed would be somewhere from 2100 to 2500...I've seen the codes, but dont know how to put them in the game and into effect.




Bluestormtrooper

>You

50 XP

13th March 2005

0 Uploads

1,752 Posts

0 Threads

#2 14 years ago

This isint scripting; this is coding. If you can know some C or C++, go get the SDK. It has some good documentation.




FireFoxProductions

Mapper, Modder, Scripter

50 XP

10th January 2006

0 Uploads

116 Posts

0 Threads

#3 14 years ago

trix arnt for kids thats for sure... both wrong, its not all about whats in the SDK or using c++.. simply, and listen carefully! GOTO (Not the kotor2 robot), ext_data IF you unpacked from the assest.pk3's. In it you will see a weapons.dat, open it with notepad or wordpad. Heres a sample coding of the storm blaster. // WP_BLASTER { weapontype WP_BLASTER weaponclass weapon_blaster weaponmodel models/weapons2/blaster_r/blaster.md3 weaponIcon gfx/hud/w_icon_blaster ammotype 2 ammolowcount 15 energypershot 1 [COLOR=yellow][COLOR=red]"[/COLOR][COLOR=navy]firetime 350[/COLOR][COLOR=red]"[/COLOR][COLOR=black]Tada.. This is the line you want![/COLOR][/COLOR] range 8192 altenergypershot 2 [COLOR=navy][COLOR=red]"[/COLOR]altfiretime 150[COLOR=red]"[/COLOR]Tada.. This is the line you want for secoundary fire![/COLOR] altrange 8192 missileFuncName blaster_func altmissileFuncName blaster_alt_func muzzleEffect blaster/muzzle_flash altmuzzleEffect blaster/altmuzzle_flash selectSound sound/weapons/blaster/select.wav selectforce fffx/weapons/blaster/select } Basicaly, in this .dat file its all there and very self explainitory. And THERE are many mods with this setting in file front. Just look in the scrips sections...




Bluestormtrooper

>You

50 XP

13th March 2005

0 Uploads

1,752 Posts

0 Threads

#4 14 years ago

Trix are for kids, thats not what that line does. Thats the RATE of fire.




BadVlad{Legend}

Knight of the Sword

50 XP

12th May 2006

0 Uploads

77 Posts

0 Threads

#5 14 years ago

yes i was just about to say that




Slusk

Scripter, Mapper

50 XP

6th July 2005

0 Uploads

389 Posts

0 Threads

#6 14 years ago

ypu don't really need to know C++ that well it is just it is just like editing a .dat file if you download Microsoft Visual C++ it is extreamly strait forward

and firefox read befor you post is often a good idea




FireFoxProductions

Mapper, Modder, Scripter

50 XP

10th January 2006

0 Uploads

116 Posts

0 Threads

#7 14 years ago

read before I post huh? Well with that coding and the directions to use EXT_DATA prove how you can configure the weapons/items. I didnt mean the cerial, Kind of a inside joke I have with a friend who I went to basic with. And slusk, most replies I give to those who need help most of the time are very accurate answers. Yes I may of over looked the fact of making the missle function coding for the projectiles making the speed more realistic. But I belive the weapons.dat file is something also to consider for more realism. No one is half wrong or half right. I am not looking to antagonise in answering simple things. Slusk, I always READ posts very closely before I reply. I even go to depths on using search engines to get my facts straight before I reply. I know I made a error, dont have to be malicious just because I forgot to include one tiny fact. And one thing I know when people usually get told read the master sticky. Not all things are secound nature to everyone else. Here are links related for SDK, www.planetquake.com/code3arena (JKA still uses a modified quake 3 engine. Coding is the same pretty much.) http://www.desy.de/gna/html/cc/Tutorial/tutorial.html (Learning how to use C++ Coding. Pm me me about this.) http://www.mt-wudan.com/ (Wudan, Maker of the dragon animation app for JKA. He is THE guy to go to for anything coding.) http://jediknight2.filefront.com/file/Combat_Evolution;26522 (this file shows what speeds are from what classes.) http://www.mt-wudan.com/jkamp/g__weapon_8c-source.html# (shows where to edit the speed etc.., VERY good for resource!) http://jediknight2.filefront.com/file/Ultra_Guns;36297 (Either make the mod and learn from this or use this mod lol..) All I seen slusk, bob, and vlad say were off topic stuff. Well bob did say read the SDK but if I were posting I wouldnt of found it helpfull because bob didnt seem to inform where to look. These links are good for using as a resource for any coding related issues. Jedi if you have any furthur questions first understand Wudans site, Overall he is a really nice guy and most likely will reply with his e-mail in due time for helping you on the right path for coding. Everything here is laid out properly. Like I said, Trix arnt for kids.




Bluestormtrooper

>You

50 XP

13th March 2005

0 Uploads

1,752 Posts

0 Threads

#8 14 years ago
TenraiIf you advise people on where to start with a task, and then they work things out themselves, they'll be able to carry out the tasks themselves more easily in future, which in turn leads to a generally more intelligent and self-sufficient population. The opposite, when you just give people everything on a silver platter, is that you get a population of bone-idle lazy, fuzzy-brained and spoiled kids who are too used to handouts to work for themselves, and so they rely on everyone to do everything for them.

Just sayin...




Slusk

Scripter, Mapper

50 XP

6th July 2005

0 Uploads

389 Posts

0 Threads

#9 14 years ago
Jedi_MediatorI have no clue how to work these scripts and codes into the game, so I'm requesting a mod: Can someone plz change all bullet speeds of guns to a realistic speed, like the speed a bullet in real life would travel? thx I think the speed would be somewhere from 2100 to 2500...I've seen the codes, but dont know how to put them in the game and into effect.

ok firefox well apparently your illiterate.

this is code directly from the SDK'S "Code"

// Bryar Pistol //-------- #define BRYAR_PISTOL_VEL 1600 #define BRYAR_PISTOL_DAMAGE 10 #define BRYAR_CHARGE_UNIT 200.0f // bryar charging gives us one more unit every 200ms--if you change this, you'll have to do the same in bg_pmove #define BRYAR_ALT_SIZE 1.0f // E11 Blaster //--------- #define BLASTER_SPREAD 1.6f//1.2f #define BLASTER_VELOCITY 2300 #define BLASTER_DAMAGE 20 // Tenloss Disruptor //---------- #define DISRUPTOR_MAIN_DAMAGE 30 //40 #define DISRUPTOR_NPC_MAIN_DAMAGE_CUT 0.25f #define DISRUPTOR_ALT_DAMAGE 100 //125 #define DISRUPTOR_NPC_ALT_DAMAGE_CUT 0.2f #define DISRUPTOR_ALT_TRACES 3 // can go through a max of 3 damageable(sp?) entities #define DISRUPTOR_CHARGE_UNIT 50.0f // distruptor charging gives us one more unit every 50ms--if you change this, you'll have to do the same in bg_pmove // Wookiee Bowcaster //---------- #define BOWCASTER_DAMAGE 50 #define BOWCASTER_VELOCITY 1300 #define BOWCASTER_SPLASH_DAMAGE 0 #define BOWCASTER_SPLASH_RADIUS 0 #define BOWCASTER_SIZE 2 #define BOWCASTER_ALT_SPREAD 5.0f #define BOWCASTER_VEL_RANGE 0.3f #define BOWCASTER_CHARGE_UNIT 200.0f // bowcaster charging gives us one more unit every 200ms--if you change this, you'll have to do the same in bg_pmove // Heavy Repeater //---------- #define REPEATER_SPREAD 1.4f #define REPEATER_DAMAGE 14 #define REPEATER_VELOCITY 1600 #define REPEATER_ALT_SIZE 3 // half of bbox size #define REPEATER_ALT_DAMAGE 60 #define REPEATER_ALT_SPLASH_DAMAGE 60 #define REPEATER_ALT_SPLASH_RADIUS 128 #define REPEATER_ALT_VELOCITY 1100 // DEMP2 //---------- #define DEMP2_DAMAGE 35 #define DEMP2_VELOCITY 1800 #define DEMP2_SIZE 2 // half of bbox size #define DEMP2_ALT_DAMAGE 8 //12 // does 12, 36, 84 at each of the 3 charge levels. #define DEMP2_CHARGE_UNIT 700.0f // demp2 charging gives us one more unit every 700ms--if you change this, you'll have to do the same in bg_weapons #define DEMP2_ALT_RANGE 4096 #define DEMP2_ALT_SPLASHRADIUS 256 // Golan Arms Flechette //--------- #define FLECHETTE_SHOTS 5 #define FLECHETTE_SPREAD 4.0f #define FLECHETTE_DAMAGE 12//15 #define FLECHETTE_VEL 3500 #define FLECHETTE_SIZE 1 #define FLECHETTE_MINE_RADIUS_CHECK 256 #define FLECHETTE_ALT_DAMAGE 60 #define FLECHETTE_ALT_SPLASH_DAM 60 #define FLECHETTE_ALT_SPLASH_RAD 128 // Personal Rocket Launcher //--------- #define ROCKET_VELOCITY 900 #define ROCKET_DAMAGE 100 #define ROCKET_SPLASH_DAMAGE 100 #define ROCKET_SPLASH_RADIUS 160 #define ROCKET_SIZE 3 #define ROCKET_ALT_THINK_TIME 100 // Stun Baton //-------------- #define STUN_BATON_DAMAGE 20 #define STUN_BATON_ALT_DAMAGE 20 #define STUN_BATON_RANGE 8

Changing The weapons.dat file you can only Change the rate on fire and he asked to change

speed a bullet in real life would travel

which means you have to edit the source code

this file comes with the SDK but incase you missed it here Jedi_Meditator:

JK2 Game Source. Copyright (C) 2001-2002 Raven Softare, Lucas Arts The Game Source is broken out into 3 areas. game - governs the game, runs on the server side. cgame - governs the client side of the game, runs on the client side. ui - handles the ui on the client side. Making a quick mod is very straightforward. This document assumes Microsoft Visual C++ v6.xx. It covers making a slight mod to the game source, recompiling for debugging and rebuilding the VMs for distribution. Slow Rockets - TestMod ---------------------- 1. Open up the jk2mp-SDK.dsw in Microsoft Visual C++. 2. Set the "game" project as the active project. 3. Open the "g_local.h" file and change the GAMEVERSION define from "basejk" to "TestMod" 4. Save "g_local.h" 5. Open the "g_weapon.c" file. 6. Go to line 85 and change the 900 to 300. The old line reads: #define ROCKET_VELOCITY 900 The new line should read #define ROCKET_VELOCITY 300 7. Save "g_weapon.c" 8. Perform a Build All command and it should build a DLL for the game. At this point you have two options. You can run the debugger, choosing 'jk2MP.exe' as the executable host which will load your DLL for debugging or you can build the VMs for distribution. When you release mods, you must build new VMs and put them in a pk3 file. Building the VMs requires the files contained in the 'bin' path are available for execution ( lcc.exe and q3asm.exe ) (The batch files included will reference them indirectly.) To build the sample vm for the slow rocket test, do the following: 1. Open a DOS window. 2. Go to your mods game directory and run the 'game.bat' file. This ultimately produces a 'jk2mpgame.qvm' in the \base\vm\ path. 5. Make a "TestMod" path under your JK2 directory. This will be a sibling to 'base' 6. Move 'jk2mpgame.qvm' to "\YourJK2Path\TestMod\vm\" 7. Run JK2MP with the following command line "jk2mp +set fs_game TestMod" 8. "TestMod" should be the referenced game and you should be able to catch up with and outrun your rockets.

Each of the areas contain a batch file "game.bat", "cgame.bat", and "ui.bat" which will build the appropriate vm files. ----------------------------------------------- Using Visual Studio to Build and Debug your Mod 1. Create a directory to hold your Mod in the STEF directory \YourJK2Path\TestMod\ 2. In VC, open Project->Settings 3. On the Debug tab Category General: -set the "Executable for debug session" to your jk2MP.exe -Set the "Program arguments" to: +set fs_cdpath yourfolderforjk2 +set r_fullscreen 0 +set viewlog 1 +set fs_game TestMod (note, if you don't have the "set fs_game TestMod", you will need to create a TestMod.pk3 file for the mod to show up in the menu - see below) 4. On the link tab, change path of the "Output file name" to your TestMod directory Do this for each of projects you are making modifications to (cgame, game, ui) ------------------------------------------------- Making my Mod show up on the Mod list in the game You need to have a TestMod.pk3 file in your mod directory before it will show up on the in-game menu. Create a "description.txt" file with some information about your game mod. Use WinZIP to create the TestMod.pk3 file. You can now put the .dll files in this directory, or create a "vm" directory and place the .qvm files in the vm directory.




FireFoxProductions

Mapper, Modder, Scripter

50 XP

10th January 2006

0 Uploads

116 Posts

0 Threads

#10 14 years ago
bobaandyJust sayin...[/quote] Yes you may tell people to look at the SDK. But thats still not enough info. http://www.desy.de/gna/html/cc/Tutorial/tutorial.html Learning how to use C++ Coding. http://www.mt-wudan.com/ Wudan, Maker of the dragon animation app for JKA. http://www.mt-wudan.com/jkamp/g__weapon_8c-source.html# Shows where to edit the speed etc! [quote=Slusk]ok firefox well apparently your illiterate.

Kid do you even know what the word illiterate means? To me it means I dont know how to write or speak. And I sure as hell know how to do both. And before anyone really understands "Vectors", it would be smart to read this. http://www.mt-wudan.com/wu_tut.php?t=vectors#VectorMA Apprently you didnt see the essential links I provided. And lastly I didnt't do not even 60% of what bob said on tenari's quote. I provided links to educate him on how to properly setup coding. Wudan's site is the best place to go for any means of resource. Now see the one link in my previous post.."http://www.mt-wudan.com/jkamp/g__weapon_8c-source.html#?" Sorry but YOU should read BEFORE you POST! Besides I bear no emotions when you reply to my posts with some aggrivation. To have any feelings in a forum would be a waste of ones time. Well, one thing for sure kids seem to be alot more cocky and argumentative then before.. When I am in the JOTRC fulltime I sure as hell wouldnt want to have someone 7 years younger then me in the next 7 years to be watching my back. Besides I am not the guy that thrash's thier keyboard. I am the guy laughing at the pissed off guy! And that would be you right now wouldnt it?