UGX-Mods

Call of Duty 5: World at War => Help Desk => Modding => Topic started by: DeletedUser on April 27, 2018, 01:08:10 am

Title: Models for AI
Post by: DeletedUser on April 27, 2018, 01:08:10 am
Is it possible to spawn a AI soldier with a model from the game files like "Xmodels" folder for example? I noticed its not possible to change there model in-game but i noticed that there is a button to the right in the KvPs for changing the model of an actor/AI however doing so does nothing at all. So is there a way to do this?
Title: Re: Models for AI
Post by: DeletedUser on April 29, 2018, 11:33:51 pm
Solved!
Title: Re: Models for AI
Post by: gympie6 on April 30, 2018, 07:01:53 am
Solved!

It's great you solved it but can you post the solution about this question?
Maybe someone has the same question and wants to learn about this.
Title: Re: Models for AI
Post by: ColdShrimp2 on May 02, 2018, 03:04:05 am
It's great you solved it but can you post the solution about this question?
Maybe someone has the same question and wants to learn about this.
Create a new character gsc & csv file and set the model to the model(s) you want(has to have the correct joints), put them in a folder called "character" in your mod folder. Then create a new folder called "aitype". Find the aitype you want from raw>aitype and copy paste it to your aitype folder in your mod and change the character it links to it to the one you previously made.
Title: Re: Models for AI
Post by: DeletedUser on May 02, 2018, 03:52:42 am
Create a new character gsc & csv file and set the model to the model(s) you want(has to have the correct joints), put them in a folder called "character" in your mod folder. Then create a new folder called "aitype". Find the aitype you want from raw>aitype and copy paste it to your aitype folder in your mod and change the character it links to it to the one you previously made.
Exactly what he said
Title: Re: Models for AI
Post by: buttkicker845 on May 02, 2018, 12:32:32 pm
I noticed its not possible to change there model in-game

You can actually change the model via script, that's all a character file does is sets the model. You just need to preCache the model before using it.

but i noticed that there is a button to the right in the KvPs for changing the model of an actor/AI however doing so does nothing at all.

Did you include the model in your .csv?
Title: Re: Models for AI
Post by: DeletedUser on May 02, 2018, 06:09:59 pm
You can actually change the model via script, that's all a character file does is sets the model. You just need to preCache the model before using it.

Did you include the model in your .csv?
Huh...i never knew you could do that! no i did not include the model in the csv. What do i put for that? xmodel, modelnamehere? also does it require a script?
Title: Re: Models for AI
Post by: Harry Bo21 on May 02, 2018, 08:00:06 pm
Huh...i never knew you could do that! no i did not include the model in the csv. What do i put for that? xmodel, modelnamehere? also does it require a script?
does it require a script - to change a model via script?

hmm
Title: Re: Models for AI
Post by: DeletedUser on May 02, 2018, 08:28:59 pm
does it require a script - to change a model via script?

hmm
Ok no one asked for your sarcasm. thanks. And i was asking if it requires a script because he made it seem like you don't and you could just precache the model in and then change it in radiant. So i apologize
Title: Re: Models for AI
Post by: death_reaper0 on May 02, 2018, 11:26:09 pm
Ok no one asked for your sarcasm. thanks. And i was asking if it requires a script because he made it seem like you don't and you could just precache the model in and then change it in radiant. So i apologize
but precaching is done in a script  ???
Title: Re: Models for AI
Post by: Harry Bo21 on May 03, 2018, 01:59:22 am
and he never said anything about radiant

radiant is for mapping bro...
Title: Re: Models for AI
Post by: DeletedUser on May 03, 2018, 02:18:20 am
and he never said anything about radiant

radiant is for mapping bro...
I am talking about the KVPS...bro....


And plus...im not trying to offend anyone so sorry i don't know much about scripting or anything...god. I swear it feels like i can never ask for help here.
Title: Re: Models for AI
Post by: buttkicker845 on May 03, 2018, 03:04:33 am
I am talking about the KVPS...bro....


And plus...im not trying to offend anyone so sorry i don't know much about scripting or anything...god. I swear it feels like i can never ask for help here.

In order to use the KVP my guess is you would have to include the model in your .csv. Although as far as I can find there isn't a KVP for changing the AI model in radiant

As for changing via script the others are correct, preCache is done via script before _load::Main() is called and the model has to be included in your .csv

So in short if you aren't specifically placing a model into the world in radiant it needs to be included in the .csv file
Title: Re: Models for AI
Post by: Harry Bo21 on May 03, 2018, 03:41:22 am
I am talking about the KVPS...bro....


And plus...im not trying to offend anyone so sorry i don't know much about scripting or anything...god. I swear it feels like i can never ask for help here.
which would still not make sense because he said "by scripting it" not "by setting kvps in radiant"
Title: Re: Models for AI
Post by: DeletedUser on May 03, 2018, 03:43:23 am
which would still not make sense because he said "by scripting it" not "by setting kvps in radiant"

Ok..chill the hell out man. I am new to scripting alright? No need to be a smart ass.


Also in Radiant there is a KVP called model for the actor. It is set to there default model and you can click the box with the three dots and it would bring up the xmodel folder ( if you set it to it ) and you could select a model..However it does not work at all....So my apologies for being to dumb to find a script for this Harry...More importantly i never knew you need to have a script for changing models. I am just simply looking for assistance with this...And if someone could give a script to use for changing AI/Actor models would be HIGHLY appreciated and i would make sure to credit the person in my maps when using the scripts.
Title: Re: Models for AI
Post by: Harry Bo21 on May 03, 2018, 05:27:15 am
It’s just a function

Ai setmodel( “modelname” );

They told you this already

The files you copy pasted do this anyway ( and is infact the proper way, script changing it is a - cheap - solution ) so if youve done it that way - you don’t need to change it

Aitypes can be made in asset manager tho, doing so creates the file you found and copied
Title: Re: Models for AI
Post by: buttkicker845 on May 03, 2018, 12:27:26 pm
It’s just a function

Ai setmodel( “modelname” );

Aitypes can be made in asset manager tho, doing so creates the file you found and copied

YES! You can obviously allow for a variety of character models to be selected by either manually defining the switch case inside of AiType file, but should really be done when selecting the character files in Asset manager


Also in Radiant there is a KVP called model for the actor. It is set to there default model and you can click the box with the three dots and it would bring up the xmodel folder ( if you set it to it ) and you could select a model..However it does not work at all....

The default model is set in the AiType file and can't be modified by radiant. Even if it could be modified in radiant it would only be the visual 'placement' for the AI and not the actual AI character model that is used in-game.
Title: Re: Models for AI
Post by: Harry Bo21 on May 03, 2018, 12:54:11 pm
That model is also just so you can tell what it is -in radiant - nothing to do with any models used
Title: Re: Models for AI
Post by: DeletedUser on May 03, 2018, 11:05:36 pm
That model is also just so you can tell what it is -in radiant - nothing to do with any models used
ahhhhh i see. Thank you...Now then...making ai in asset manager sounds easy. Any tut i can follow along? ive tried making ai in Asset manager but i could not figure it out.
Title: Re: Models for AI
Post by: Harry Bo21 on May 04, 2018, 12:42:08 am
Have you tried looking for one? Lol

Aitype is just for models and anims. Which you did in note pad anyway. It’s the same difference

For different ai “behaviour” needs scripting
Title: Re: Models for AI
Post by: DeletedUser on May 04, 2018, 03:12:37 am
Have you tried looking for one? Lol

Aitype is just for models and anims. Which you did in note pad anyway. It’s the same difference

For different ai “behaviour” needs scripting
Yes i have searched for a tut. Had no luck when it came to AItype.