WTF?!?! please help

Locked
zonide
Posts: 11
Joined: Fri Aug 25, 2006 10:41 pm

WTF?!?! please help

Post by zonide »

:icon23: :icon28: :dork: :confused:
....

aright... how do i get the compiler to use the modifications ive made durring gameplay?

from my understanding it seems easy

load the source, make some changes, hit the play button and the mods should be implimented

but heres what happens

i load the source, make some changes, hit the play button and the first time around the mods are in effect

i want to make some more changes, so i close the game

make some changes to the source, hit play, the game loads, but none of the changes are implimented

wtf?

it works when it wants to?

i figured that couldnt be the case... so i started investigating what might be wrong

im new to this mod thing so before i started looking around, i didnt know about the QVM files...

durring my search i found what they are and what they do

so to try and fix my problem... i tried to create some QVM files for my mod in hopes that instead of running the game through the compiler, i could just compile the source, make some qvms then run the mod through an existing Q3 exe

then i found out that my BAT files to make the QVMs dont work properly...

something about cc and lcc arent recognised by the command prompt...

so...

how come my changes to the game arent being used by the compiler?

what files can i get to make a QVM?

is there another way around having to make a QVM every time i want to test out the changes ive made?

help me please

:icon27: - Zonide - :icon27:
torhu
Posts: 76
Joined: Thu Jun 16, 2005 7:57 pm

Post by torhu »

To make q3 load dll files, you need to add this to the command line:

+set vm_game 0 +set vm_cgame 0 +set vm_ui 0 +set sv_pure 0


Have a look here:
http://www.planetquake.com/code3arena/
http://www.planetquake.com/q3console/variables.htm

lcc is the C compiler that comes with the q3 mod source. It's modified to compile to byte code instead of object code. In other words, it produces qvm files. It's in '\quake3-1.32b\lcc\bin\'. It's possible you need to run the batch files with cmd.exe, not command.com for them to work.

If you still can't get things working, please post the actual error messages you get, and you'll probably get better help. :)
[url=http://www.smokin-guns.org]Smokin' Guns[/url]
[url=https://sites.google.com/site/monsterbrowser//]Monster Browser[/url]
zonide
Posts: 11
Joined: Fri Aug 25, 2006 10:41 pm

thank you thank you

Post by zonide »

thank you

im guessing that the info for the mods is compiled in to the dll files

so if i load q3 with the dlls that have changes in them, q3 will reflect those changes

ex:

i make a jump to the ceiling mod, compile it into dlls then load it with that command line you gave me, and bam i should be compensating from fall damage from jumping too high

right?

after that where do i put the dlls?

do i put them in the mod folder?

as far as the qvm files go.. ive made a little bit of progress... i realized that i put the path for the lcc in the wrong spot in the the enviroment variables section... :icon27:

now ive got as far as having a bunch of .asm files in my vm folders for cgame, game, q3_ui and ui...

but now i dont know what to do with them...

i figured that there would be another bat file to run that condenses all the asm files into one or 2 qvm files

ive tried putting the asm files into one vm folder in a mod folder...

no dice...

so now that ive got a bunch of .asm files... what do i do with them to get them into qvm files...

thanks

peace

:icon27: :icon28: - Zonide - :icon27: :icon28:
corncobman
Posts: 304
Joined: Fri Aug 08, 2003 7:00 am

Post by corncobman »

The batch files supplied with the source code should automatically make the qvm files as part of the compile process.

Check the \quake3\baseq3\vm folder for the qvms. If they aren't there then something is wrong.

Dll's go directly into the mod folder and qvms go into a folder called vm inside the mod folder.
-It is not the fall that kills you. It's the sudden stop at the end. (Douglas Adams)-

[url=http://www.violationentertainment.com/misc/ccm]-An eyeful a day is bloody fantastic!-[/url]
zonide
Posts: 11
Joined: Fri Aug 25, 2006 10:41 pm

Post by zonide »

thank you thank you

dlls and running from debug mode have come together nicely because of the command line provided from torhu (thank you)

as far as qvm files go, tkk bandit gave me a few lines for a bat file to make them work... i modified a compile bat that the original q3 source didnt include (which i borrowed and modified from tkk bandit so that they worked for the version of the source i was using, instead of the version that was included in the zip that the bat was intended for)... i also realized that durring the compile process used by the bat files... if there are any errors... you wont get a qvm... retrospect... duh... :dork:

so now, when i want to make qvms, i load CMD run the compile bat and i end up with qvms (as long as there arent any errors)

which i imagine is what should happen any way

:icon27:

now i feel dumb...

but that usually happens... i end up going 666 ways from sunday to figure out that im complicating something simple... :confused: then when i finally understand... yep.. :icon32:

one more question...

rapid rail?

or rapid fire anything?

ive been looking through the source... and i cant isolate which files/combination of variables throughout multiple files that have anything to do with the firing intervals for any of the weapons...

thanks again

peace

:icon34: Zonide :icon34:
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Post by ^misantropia^ »

zonide wrote:rapid rail?

or rapid fire anything?
Grep for addTime in game/bg_pmove.c
zonide
Posts: 11
Joined: Fri Aug 25, 2006 10:41 pm

Post by zonide »

thank you thank you

health?

ive searched just about everything that says health... only to find that none are simple.. like max_health = 100...

ive been writing this message for about an hour now... (i paused to work on the code to see if i didnt have to make this post, but now im back)

aright... right about now if i was standing in your rearview mirror.... you could read QWERTY on my forehead

______________

health = 500; //atoi( Info_ValueForKey( userinfo, "handicap" ) );
client->pers.maxHealth = health;
if ( client->pers.maxHealth < 1 || client->pers.maxHealth > 500 ) {
client->pers.maxHealth = 500; //100
}

the code above is the code from g_client.c - clientuserinfochanged that i managed to find... thinking it was where the max health was set... i even commented out the old handicap thing and set the first health variable to 500 just to see if the handicap thing was screwing me up...

still nada...

// count down health when over max
if ( ent->health > client->ps.stats[STAT_MAX_HEALTH] ) {
//ent->health--;
ent->health = client->ps.stats[STAT_MAX_HEALTH];
}

i just put this in to g_active.c - clienttimeractions to see if any of the other changes to the health variables were having any effect on the STAT_MAX_HEALTH...

only to find that the max health is still set to 100...

thanks and peace

:paranoid: zonide :paranoid:
zonide
Posts: 11
Joined: Fri Aug 25, 2006 10:41 pm

Post by zonide »

found it....

it was in multiple spots

g_client.c -- void ClientUserinfoChanged( int clientNum )

g_client.c -- void ClientSpawn(gentity_t *ent)

...

thanks anyways

peace
zonide
Posts: 11
Joined: Fri Aug 25, 2006 10:41 pm

Post by zonide »

apparently i lied


while the health vars are located where i said they were

there was some redundancy (spelling)

the max health was being set twice in the original source... mistake?

or is it like that for a reason i dont understand...

why that would have be set twice?

i tested it and set the max health thing in clientuserinfochanged

to 100

and the one in client spawn to 999

and it kept switching between the 2...

wtf..

so i took out the one from clientuserinfochanged completely... and the game still runs fine...

and i took out the code for adding health if its below max from the g_active.c

but... it still sets the health to 999 in less than a second... so i imagine that the code that is resetting to 999 isnt located in the g_active.c file...

i cant isloate what is resetting the health...

it might be in the clientspawn in g_client.c.. i guess that would only be true though if setting the health would be global... and not isolated to the player being spawned...

could someone help me?

basically the game keeps resetting the health to 999 even when there are no other players (human or bot, which rules out the spawn thing) and without a add health piece of code in the clienttimeraction

thanks peace

-Zonide-
corncobman
Posts: 304
Joined: Fri Aug 08, 2003 7:00 am

Post by corncobman »

Does it get set to 999 as soon as you spawn or does it take a while to get to 999?
-It is not the fall that kills you. It's the sudden stop at the end. (Douglas Adams)-

[url=http://www.violationentertainment.com/misc/ccm]-An eyeful a day is bloody fantastic!-[/url]
zonide
Posts: 11
Joined: Fri Aug 25, 2006 10:41 pm

Post by zonide »

thanks for the reply

it sets it to 999 when i first start. if i take 809 damage that puts me down to 90, the game resets the health back to 999 without counting back up.

if ( ent->health >> client->ps.stats[STAT_MAX_HEALTH] ) {

//ent->health--;
//ent->health = client->ps.stats[STAT_MAX_HEALTH];

//ent->health -= 10;
ent->health -= 10;
}

// add health when below max

if ( ent->health << client->ps.stats[STAT_MAX_HEALTH] ) {
//ent->health += 10;
ent->health += 10;
}


green: thats the code from ClientTimerActions that deals with health regeneration.

it should count back up to 999, right?

instead of just going right back up to 999

this is in game - g_client.c - ClientBegin

trap_GetUserinfo( index, userinfo, sizeof(userinfo) );
// set max health
//client->pers.maxHealth = 999; //atoi( Info_ValueForKey( userinfo, "handicap" ) );
// if ( client->pers.maxHealth < 1 || client->pers.maxHealth > 999 ) {
// client->pers.maxHealth = 999; //100
// }
// clear entity values
//client->ps.stats[STAT_MAX_HEALTH] = client->pers.maxHealth;

client->ps.stats[STAT_MAX_HEALTH] = 999;
client->ps.eFlags = flags;
ent->health = client->ps.stats[STAT_HEALTH] = client->ps.stats[STAT_MAX_HEALTH];


the green text is the code that i use to set max health and current health when the clientbegins

the red code is the old code

dont you think that the max health var should be set only one time when the match starts?

i dont undestand why they set it twice in the red code...


thanks
corncobman
Posts: 304
Joined: Fri Aug 08, 2003 7:00 am

Post by corncobman »

zonide wrote:
if ( ent->health >> client->ps.stats[STAT_MAX_HEALTH] ) {


if ( ent->health << client->ps.stats[STAT_MAX_HEALTH] ) {

These are the lines that are the problem

to compare two values against each other use < or >, not << or >>.

<< and >> shift the values (which you do NOT want in this case).


They set it depending on the player's handicap. If the player has handicap set to 70, then their maximum health becomes 70.
-It is not the fall that kills you. It's the sudden stop at the end. (Douglas Adams)-

[url=http://www.violationentertainment.com/misc/ccm]-An eyeful a day is bloody fantastic!-[/url]
Locked