Jump to content

Home

Help Needed; RE: Yoda


sithlord-II

Recommended Posts

hi guys

now, i am not a coder, never have been, never will be. Which is why, i am in here, crying for help

:)

I have received word from James Monroe that resizing characters within multiplayer is, in fact, quite possible, but not easy.

i emailed him recently about coding, and this was his response:

 

"Okay. I looked into the MP code and it's not going to be easy.

Ghoul2 IS setup to take scale as a parameter, but the game code always passes in the Identity matrix for it. So, yes, scale can be added by changing all the code to pass in entity.scale instead to those functions like:

 

trap_G2API_CollisionDetect and trap_G2API_GetBoltMatrix, etc.

 

The reason we didn't was that it could be a cheat to be physically smaller"

 

now, i have had a look through the code but i have no idea where to start on it, i think it has something to do with the properties for ent.modelscale or simply modelScale within those commands. This is an open request, and anyone who is interested in trying this out, Arco, Kinja and myself would be very grateful. A result like this would of course mean the possibility of cheating, etc, but perhaps if it could be hard-coded to use a seperate sizing matrice for different characters- ie. yoda, ewok, human, vader/desann size, then chewbacca - it would be an improvement into the game and would help to prevent cheating, if it were hard-coded, instead of using something just anyone could modify and use in a CFG file. oh well, just an idea, anyways.

 

Thank you guys

 

Sithlord-ii

Link to comment
Share on other sites

  • Replies 69
  • Created
  • Last Reply

I've looked through the code too, and even being a programmer, couldn't figure out what needs to be changed to get it working. I started a thread a few days ago about it..

 

http://64.246.44.70/~lucasforums.com/showthread.php?s=&threadid=63564

 

The bounding box is what someone said another Raven dev told someone to modify. *sigh* if only Raven would help out, lol.

 

Is there anyone who is familiar enough w/ the source to shed some more light on this. Getting Yoda in game would truly be a great accomplishment for the JKII forum community, and would appease lots of people who want to run around saying, "Much to learn you still have."

 

SithlordII, I'm still looking at it, and I'll have other programming friends look at it too, to see if we can figure it out....

Link to comment
Share on other sites

ghoul2 && me.knowledge == BETTER_AND_BETTER

 

 

well i don't say i understand everything but i'm getting better...

 

I have been able to modify the hilts and to allow diferent person to wield a diferent one ....

(but i still have a nasty bug when saber throwing.)

 

And i tryed to modify the scale and i have been able to have a tiny kyle client side BUT the server side is not done yet (and the position of the saber is done serverside so: wierd saber not attached to the handle...)

 

It s a very primitive work but i ù stil working on these 2 projects...

i ll keep you updated.

Link to comment
Share on other sites

well i modified all the get bolt matrix , get boltmatrix norot and etc .....

for the server side for the ghoul2 collision on the server.

 

and for the client side only a few additions to the CG_Player function.

like the legs scaling (the legs => the model) and the player entity scaling.

 

I m not sure the hit detection works flawlessly.

i m gonna post some screenshots.

I hope everything is going to work.

 

If you could send me the yoda model that would help....

(i ll understand if you don't want to now...)

(i hope you will trust me when i ll post screenshots :) )

 

And what scale do you want for the yoda ?

Link to comment
Share on other sites

looks very cool, tchouky

message me on ICQ 20568386 or msn frost_michael@hotmail.com

 

i had a bit more info sent to me from James monroe as well -

 

"But here's an example from SP:

gi.G2API_GetBoltMatrix(cent->gent->ghoul2, cent->gent->playerModel, cent->gent->headBolt, &boltMatrix, tempAngles, ent.origin, cg.time, cgs.model_draw, cent->currentState.modelScale );

 

 

 

You can see that the entity has a field called modelScale that is passed into the g2 function. That scale has to be added to every g2 call that is currently passing in the identity matrix (scale of 1)."

Link to comment
Share on other sites

Tchouky, that is VERY, VERY cool. I'm impressed.... How did you figure it out? lol

 

The only thing that looked strange to me was the normal sized saber, but that's a whole other modification to worry about, and I don't think it's much of an issue because Yoda and other small creatures "could" use someone else's lightsaber.

 

Could you possibly make it read from a file that's part of the pk3 file to get the model size? That way, other model makers could make smaller (or larger - Chewbacca, Rancor monster, etc) models.

Link to comment
Share on other sites

well currently the display works great and there is no apparent flaws ...

 

But i still have to modify the bounding box for the collisions and hits.

I'm still figuring out how they work.

for the saber lenght there is no problem :)

 

If you have ever played my TCK saber mod you know that i made a special extended blade (like corran horn's blade).

ie you press a key the blade grows and change it s color (with a nice shade).

So i know how to extend it so i should be able to reduce it :p

 

for the size of the model i created a cvar

1 = normal size

2 = tiny size (60%)

3 = huge size (120%)

but that's easy to change,add...

we'll see

 

sithlord-II : thx for the code but that's allright i understood it .

Link to comment
Share on other sites

i have been able to modify the bounding box.

i ve just checked for the jumping and stuff but it should work the same ways for weapons so no problemo .

 

well if sithlord II or Kinja send me the yoda model to test it and adjust the scale.

i'll see what i can do for preventing cheat but...

(i think it will be a simple cvar .....)

I think i will shorten the blade of the small characters.

and put it longer for big characters so they have an advantage and a flaw.

(easy to hit + longer blade) = big

(hard to hit + small blade) = small

 

and it will look better.

 

BUT NOW IT'S 4 AM and i'm gonna sleep :p

 

soon (maybe tomorrow) ===> :yoda::yoda::yoda:

Link to comment
Share on other sites

Well i think i will create a file on the server and allow the server admin to select which model need to be scaled.

 

like something like this :

 

scale.cfg

 

yoda 0.6

kyle 1

desan 1.05

chewbacca 1.2

jawa 0.65

 

what do you think ??

 

here is my email :

martin.tck@wanadoo.fr

If you could send me the yoda model now because i need it to finish my work.

Link to comment
Share on other sites

I've succesfully created a file loading system for the scales.

 

so there is a modelscale.cfg in my mod's dir and it looks like this.

 

//tckmodel.cfg

yoda 0.6

desann 1.2

kyle 1

chewbacca 1.4

ewok 0.55

 

AND best of all it's WORKIIIING !!

 

the limits are 0.5 to 1.5 .

if a player have this model on then he will be scaled.

simple isn't ?

 

I have to adjust the lightsaber lenght now....

that won't be long thought.

Link to comment
Share on other sites

damn man that is cool

i will email you later with some information if you'd like, and with yoda as well - i'm currently at work so i won't be able to send it for a few hours more. i will finish touching up yoda (ie. seams, vertex weightings, and caps) and send him your way

BTW i used the scale of 50 for yoda, as well

 

sithlord-ii

Link to comment
Share on other sites

ha ...

I spent the whole afternoon trying to fix a nasty bug !

But i'm done with it nom :)

(i always win :p it may take time but i always find a way!)

 

well the bug was when you kicked a bot a add a new one the scale check code would mess up the bot client info (very wierd..)

(stupid buffer :rolleyes: )

and the bot had a curious name : what was written in the medelscale.cfg file so the bot was called :

 

yoda 0.6

kyle 1.0

desann1.2

 

with a nice name on 3 lines lol !

 

a question : is the model itself scalled ?

(well i don't really think it will change anything but i'm just curious :))

 

i'll compile a complete version for you and i'll send it to you so you willl be able to tell me what's wrong and make a few suggestions.

Link to comment
Share on other sites

very impressive. Will your mod be open-source? It would be very interesting to see what you changed to make this possible. I can see some cool mods coming out in the future that use scaling of models. Just think of a ROTJ mod where you fight the Rancor monster, battle Vader and the emperor, fight alongside the Ewoks, etc.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...