Game Development Community

Seriuosly...

by Wolf Okami · in Technical Issues · 11/20/2008 (1:09 pm) · 23 replies

Ive been trying for days to make my AI a different player model i wish someone could give me a detailed tutorial on how to do this with killer kork seeing how i cannot get it to load the god **** other model


I just need a tutorial for changing the Aiplayer model .
Page «Previous 1 2
#1
11/20/2008 (1:40 pm)
This has been answered quite a few times, in previous threads, and in threads that you created.

First, go to the Killer Kork resource page, and read ALL of the posts. It was answered there a few times.

The short answer, from SilentMike:
Quote:
Simply add the fields that you want the "child" to override to the above datablock like so:

datablock PlayerData(DemoPlayer : PlayerBody)
{
   shootingDelay = 2000;
   shapeFile = "~/data/shapes/AIplayer/AIplayer.dts";
};
#2
11/21/2008 (10:10 am)
I DID THAT IT!!!!

It wont work, why do you think im still asking! You don't have to harass me all i wanted was an easy explanation from someone else who might have resources to help. Or maybe more explicit on everything i have to do
#3
11/21/2008 (10:18 am)
It would be more helpful if you:
1) informed us which Torque product you own.
2) explained what happened when it didn't work. Unless you describe the problem, nobody can help.
#4
11/21/2008 (10:38 am)
@Cameron

You've been shown where to change the shapeFile several times now. Do you understand that the examples shown are just that and the location and name of the shapeFile needs to be whatever you have it named?

Also, did you remember to change the name in the TSShapeConstructor for that shape?

datablock TSShapeConstructor(PlayerDts)
{
   baseShape = "./player.dts";
   sequence0 = "./player_root.dsq root";
   sequence1 = "./player_forward.dsq run";
   sequence2 = "./player_back.dsq back";
........


Did you even create a TSShapeConstructor for it?

I might add that Taylor's advice of describing the problem is important. As I look over your posts they all more or less amount to "It doesn't work", which gives anyone willing to help you nothing to go on.
#5
11/21/2008 (12:27 pm)
The code I gave you worked for me with my filepath and shape. I'm sure I mentioned that you would have to change the path - I even gave you an example with your specified folder structure and filename. Even told you that you would have to load and merge the animations for the new shape.

If it doesn't work then you're doing something wrong.

Simple question 1: did you delete the old .dso file before you re-ran the game with the new script?
Simple question 2: are there any errors in the console or logfile?

Suggestion: some specifics other than it doesn't *****work would be of help.
#6
11/21/2008 (12:35 pm)
The DemoPlayer : PlayerBody part tells you that the DemoPlayer (the AI) is derived from the PlayerBody. This means that the DemoPlayer datablock shares/inherits all "traits" (fields) of it's "parent" datablock (PlayerBody). This allows the AI to use everything already existent for the PlayerBody (datablock fields and methods) without having to duplicate large amounts of similar code.

Simply add the fields that you want the "child" to override, in this case all you're wanting to do is to tell the DemoPlayer : PlayerBody datablock to use a newly specified shapefile.

Quote:You'll have to change the .../AIplayer/AIplayer.dts part to point to the shape you wish to use, and you'll have to load, merge, and execute the animation data for the new model.
#7
11/21/2008 (1:58 pm)
Cameron,
The folks here at GG spend time to answer your question to the best of their ability, based on the information you provide.
Blanked out cussing isn't going to make the help you receive any more accurate or any more urgent.

When I read your post just hours after you posted it, I knew what you were asking for and I assumed
that your using the TGE 1.5.2 Demo version.
I went ahead and read all of your posts so I was clear on your question, just to be sure, and I even started
to write a detailed PDF file with step-by-step hand-holding with lots of pictures so there was no mistake on what you were about to be taught.

I deleted the PDF.

I decided it is better for you in the long run to go to this thread:
www.garagegames.com/products/87/ and buy that book.

After you have completed reading it, you'll be proficient enough to Script for your Demo version of TGE.
You'll be wiser and more informed before you post here.
The best part is, the Book will teach you far more then your asking for.
Best of Luck to your Game endeavors.
#8
11/21/2008 (4:37 pm)
Nvm i figured out the different model part and texture part but for some reason it wont load the animations i put in the player2.cs file in the player2 folder.

what do i have to do for animations?
#9
11/21/2008 (5:17 pm)
See what happens when you get help from several people you start to understand things


Im only 15 im new to this stuff and i got it, with a little help
Thank you

but still why don't it load the anims?
#10
11/21/2008 (7:38 pm)
Again, you're not giving enough information. Are there errors in the console log? Were the animations even properly exported?
#11
11/21/2008 (9:17 pm)
Cameron,

Can you load the animations in the ShowTool Pro? if so, and they play with your model, then they should work. If not then the animations are not set up correctly for your model on export.

If they work in Showtool pro but don't work in the game engine, then I'm guessing you have an issue with your player2.cs file.

Number 1... Did you actually load that Player2.cs file via the game.cs script in the server scripts folder? If not then you'll need execute it in a script that gets run when the server starts.

If you done all that, and it still doesn't work, I've had some issues with the slots I loaded animations into and the names I gave them. The engine expects certain names for player movement etc.
#12
11/22/2008 (6:43 am)
There is another, sometimes overlooked problem that can happen to stop your progress.

Where are you exec'ing your player2.cs file? I'm assuming it's in game.cs, but where in the line of exec's?

Your player2.cs should be loaded right after player.cs.

Example:

exec("common/server/lightingSystem.cs");
   
   exec("./player.cs");
   exec("./player1.cs");
   exec("./player2.cs");
   exec("./aiPlayer.cs");
etc...

The loading sequence is important.
#13
11/22/2008 (7:47 am)
Oh wait so i have to put the player2.cs in there too? to be executed i thought i only needed the bot script because it already identified the datablock but ill try that thanks.
#14
11/22/2008 (8:23 am)
Well i did all of that it ran in showtool but not in torque it only worked when i changed player2.cs back to just player.cs then all the animations worked correctly in showtool.

i changed this line to that in the player.cs

datablock TSShapeConstructor(PlayerDts)

datablock TSShapeConstructor(Player2Dts)


but what should i put in bot.cs int he server folder where it shows the datablock thing

i put this in there

datablock PlayerData( MyBot : Player2Dts )

is that right?

it loads the shape just not the anims
#15
11/22/2008 (8:31 am)
Your problems will dissapear, and you'll gain valuable insight after you visit this link and purchase the book.

www.garagegames.com/products/87/

You'll save time and frustration.
Your resources will make sense when you plug them in.
You'll gain the understanding of HOW and WHY.

And the volume is a reference besides, that you'll use and refer to long after you get this very simple resource to work.
#16
11/22/2008 (8:33 am)
Yeah i dont have the money cheese whiz... i need a simple awnser
#17
11/22/2008 (9:26 am)
The player.cs file you are talking about is the player definition file that is housed inside the player.dts folder.
That file is required to be be called player.cs or it won't work.
The way I did it, was like the following:

datablock TSShapeConstructor(malePlayerDts)
{
   baseShape = "./player.dts";
   sequence0 = "./player_root.dsq root";
...Etc...................
I copied the player.cs for Kork over to my folder and simply changed the name in the constructor.
Everything else stayed the same.

Edit: Cameron, you may want to watch how you talk to people here. snide remarks and comments make people NOT want to help you. Keep it calm, cool and collected and you will get much further.
#18
11/22/2008 (9:59 am)
Cameron your "simple answer" is in the book. Ask your parents to help you.


See, I am really trying to point you in the right direction to go.
After you have read the book, you'll be ready to buy a license to TGE and make a real game.
( from what i remember even 1.5.0 SDK license owners are obvious when you click the user name, it shows
"Torque SDK owner" ).

I would just rather see you take a serious approach to using TGE the right way.. with the Book.

The approach your taking now.. choosing a resource that interests you and trying to make it work with the help of the cummunity, doesn't really help you understand the HOW and the WHY, it just helps you get a neat resource into your demo, and you'll learn nothing in the end except that Torque community provides Help and nice resources.
See?
Thats partly the reason I deleted the PDF i was making for you.. I realised it would only do you injustice if i simply gave you the answer, and Fredericks Book is far superior to any PDF in terms of Torque programming or scripting.
My advice is actually the best advice in this thread. I hope you follow through with this advice so we can hear from you later on about the Awsome game you made. Honestly.
#19
11/22/2008 (10:21 am)
Quote:Ask your parents to help you.

LOL
#20
11/22/2008 (10:28 am)
The simple answer is exactly what I've told you and also Mike Rowley's post up above about the TSShapeConstructor. You will have to change the names and filepath to indicate your model.

If you need to know where to exec the new TSShapeConstructor at then take a look at the player.cs file in server/scripts (the DEMO scripts). At the top of that script file you'll see this line: "// Load dts shapes and merge animations" that's where the existing Korc and/or Elf animations are exec'd from. You'll notice that the TSShapeConstructor script file for each is located in the relevant data directory for each model. Pay attention to the names used. Notice that Korc's shapefile (baseShape) player.dts his TSConstructor is called PlayerDts. The elf's shapefile (baseShape) is elf.dts her TSConstructorr is called ElfDts. Do you see the pattern there?

Best advice other than a sales pitch for any of the books available is to take the time to look over the existing scripts and try to understand how they all link together. Read over all of the documentation that you can find - the information is all there (here) if you only look.
Page «Previous 1 2