ubiqvisuals

Login Form




Ubiq Visuals Forum
Welcome, Guest
Please Login or Register.    Lost Password?
UAISK Not working with Ubiq 3D Action Adventure Ki (1 viewing) (1) Guest
Go to bottom Favoured: 0
TOPIC: UAISK Not working with Ubiq 3D Action Adventure Ki
#492
UAISK Not working with Ubiq 3D Action Adventure Ki 3 Years, 1 Month ago  
Hi guys I have a problem when I install Ubiq 3D Action Adventure Kit. The problem is that 3DAAK modifies the movement in player.cpp and player.h, so when I install both kits the AI bot will spawn and try to kill me but it won’t move. I have already try replicating the original Player.h and Player.cpp (called Player2.h and Player2.cpp) and having aiClient and aiPlyer instance Player2.h and Player2.cpp. The problem is that when I do this the marker wont spawn the player and it will tell me that it can’t spawn a null obj. Anyone have any idea of what can I do so that my AI bots spawn with the Player2 move list or has any one successfully installed the 3DAAK and UAISK that can tell me what to do? I appreciate your help.
 
Logged Logged  
  The administrator has disabled public write access.
#493
lornem ()
Ubiq Visuals
User Offline Click here to see the profile of this user
Gender: Male lorneswork.com Location: Vancouver
Re:UAISK Not working with Ubiq 3D Action Adventure Ki 3 Years, 1 Month ago  
Hi Luis,

So to summarize, you now have 2 player classes: Player (3DAAK) and Player2 (T3D). Is this correct?

Did you also make a new PlayerData2 class, and accompanying datablock script?

In this file (/game/art/datablocks/player.cs), you should have two datablocks now:
Code:


datablock PlayerData(3DAAKPlayerData) {...}
datablock PlayerData2(T3DPlayerData) {...}



Remember to use the 3DAAK player parameters in 3DAAKPlayerData, and the default T3D player parameters in T3DPlayerData. They're different!

In your level, your spawn marker can then be set to spawn either player by specifying the spawnClass and spawnDatablock fields.

Code:


new SpawnSphere() {
spawnClass = "Player2";
spawnDatablock = "T3DPlayerData";
...
}



Also check out this file (/game/core/scripts/server/spawn.cs). You may need to change these values:
Code:


$Game::DefaultPlayerClass        = "Player";
$Game::DefaultPlayerDataBlock    = "DefaultPlayerData";



I hope that helps. Let me know if that didn't get it, or if I misunderstood something.

Lorne
 
Logged Logged  
 
Last Edit: 2010/04/13 18:28 By lornem. Reason: Added datablock example
  The administrator has disabled public write access.
#494
Re:UAISK Not working with Ubiq 3D Action Adventure Ki 3 Years, 1 Month ago  
Thanks Lornem! The thing is that we wanted to use Player (3DAAK) for our main playable character and Player2 (T3D) for our AI bots. The reason we want to do this is that we are using a AI kit that uses the old movements from T3D. In the tests I have made so far have shown that it will spawn both Player and AIBot only if they are both spawn from the same type of datablock. So we know that using Player (3DAAK) and Player2 (T3D) at the same time is not possible. So we were wondering if you know of a way on how to use the 3DAAK movements for our Player and the T3D movements for our AI bots?
 
Logged Logged  
  The administrator has disabled public write access.
#495
lornem ()
Ubiq Visuals
User Offline Click here to see the profile of this user
Gender: Male lorneswork.com Location: Vancouver
Re:UAISK Not working with Ubiq 3D Action Adventure Ki 3 Years, 1 Month ago  
Yeah, I see what you're trying to do :)

It should work I think... There's probably just some change you've forgotten to make somewhere.

You say:
...it will spawn both Player and AIBot only if they are both spawn from the same type of datablock

I'm wondering if you could elaborate on this. Why doesn't it work when you use 2 different datablocks? (Or what happens when you try?)

Lorne
 
Logged Logged  
  The administrator has disabled public write access.
#496
Re:UAISK Not working with Ubiq 3D Action Adventure Ki 3 Years, 1 Month ago  
It crashes. Torque stops working. The funny thing is that it doesn’t crash when both the Player and the Bot get their datablock from the same source. So that’s why I’m asking if you know of a way to let Player.h and Player.cpp keep both types of movements? Or do you know why 3DAAK doesn’t let some Ai movement functions work, like setmovedestination for example?
 
Logged Logged  
 
Last Edit: 2010/04/13 21:44 By luisfdeleon.
  The administrator has disabled public write access.
#499
Re:UAISK Not working with Ubiq 3D Action Adventure Ki 3 Years, 1 Month ago  
Lornem I really need to know how the AI works with 3DAAK install in Torque. The problem that I’m having is that the AI bot will not move! I already try a bunch of AI scripts and non will move. We are falling behind on schedule and really need to know how to solve this because we need the gameplay from 3DAAK but we also need AI bots so that the player can fight them. Even basic AI bots will do, I just need them to attack and move! Thks for the help.
 
Logged Logged  
  The administrator has disabled public write access.
#502
lornem ()
Ubiq Visuals
User Offline Click here to see the profile of this user
Gender: Male lorneswork.com Location: Vancouver
Re:UAISK Not working with Ubiq 3D Action Adventure Ki 3 Years, 1 Month ago  
Hi Luis,

First, I should remind you of our disclaimer regarding custom changes and third-party kits:

Ubiq does not officially support installing any of our kits into anything except clean (unmodified) Torque SDKs. (As I'm sure you can appreciate, there are an infinite number of different add-ons & modifications that developers can apply that may be incompatible with our kits in some way, and it's very difficult to debug codebases where we are unfamiliar with what has been modified.)

With that out of the way... I'll of course still try to help :) We just can't guarantee a solution.

I've noticed a possible pitfall in what you've described:

You've named the original player class, "Player2". However the AIPlayer class extends Player:
Code:


class AIPlayer : public Player {...}


Did you change this line? If you want your AIPlayer to use the original player class, it will need to extend Player2 now.

Lorne
 
Logged Logged  
  The administrator has disabled public write access.
#519
Re:UAISK Not working with Ubiq 3D Action Adventure Ki 3 Years ago  
Hey Lorne, just dropping by to update on the situation. Well its working fine now. I went the easy rout and copy the original updateMove function, rename it, polish it and made the aibot to use that one. Just one thing that you migh find usefull, I notice that the reason the bots were not moving is that the acceletarion and speed variables allways end up will a zero value when trying to move a aiBot with the modify 3DAAK updatemove function.
 
Logged Logged  
  The administrator has disabled public write access.
#528
Re:UAISK Not working with Ubiq 3D Action Adventure Ki 2 Years, 11 Months ago  
luisfdeleon,

I have been looking at the UAISK myself, considering using that as a starting point for our AI. Would you mind sharing the actual changes you had to make to get it all working together?

I am not sure how the Ubiq crew would want it done considering it would involve revealing some of their source code, but if you are willing to share your fix for it, it would be greatly appreciated. Justin or Lorne can verify that I am a licensed owner, and if they prefer it not be posted on the forums then you can contact me at syllus AT satx DOT rr DOT com. If you prefer not to share your work, I understand that too, but if you don't mind, I thank you in advance. :)

~ Sy
 
Logged Logged  
 
"Something dwells within the night,
that is not good and is not right..."

The Book of Counted Sorrows
  The administrator has disabled public write access.
#529
Re:UAISK Not working with Ubiq 3D Action Adventure Ki 2 Years, 11 Months ago  
Hey! I can verify that Syllus is a licensed 3D Action Adventure Kit owner. As for source code, we would request that you do no post it here or anywhere else public. Garage Games legally requires us not to have any source code made public considering it is their copyright. Cheers!
 
Logged Logged  
  The administrator has disabled public write access.
#739
Re:UAISK Not working with Ubiq 3D Action Adventure Ki 1 Year, 8 Months ago  
I have purchased both kits, which are awesome, recently and have been trying to get them to work together, and like others before me have run into troubles. Then I came across your post here. I, like Syllus would be eternally grateful if you were willing to share how you got these two to work together, but also understand if you don't - due to all of the work that you must have done. I do own a license for both UAISK and Ubiq 3dAAK. If because of GG's policies of posting such info in the forums, you can contact me at gm6061 AT sbcglobal DOT net. Thank you for posting this for it lets me know that it is possible.

~ Greg
 
Logged Logged  
  The administrator has disabled public write access.
#749
Muro ()
User Offline Click here to see the profile of this user
Re:UAISK Not working with Ubiq 3D Action Adventure Ki 1 Year, 6 Months ago  
Luis, I also would love to see the changes you did to get the two working together. I also bought the UAISK and 3DAAK with dreams of mashing them together. Also planned to throw AFX in on it, too, but I am not a coder and failed miserably.
 
Logged Logged  
  The administrator has disabled public write access.
#808
Mack ()
User Offline Click here to see the profile of this user
Re:UAISK Not working with Ubiq 3D Action Adventure Ki 1 Month ago  
I picked up 3DAAK over the weekend and have spent the last few days getting UAISK setup with it. Right now I have a working solution that has a UAISK character running around.

I'm not a coder so this probably isn't 100% and will most likely require a bit more fine tuning. If you run into problems then I most likely won't know how to help but it should hopefully help getting things setup:

+) Make sure you have two completely separate T3D installs. One for your 3DAAK build and one as an original source reference.

+) Install 3DAAK as you would normally

+) Setup your Visual Studio 2008/2010 Project to edit your 3DAAK T3D build

+) Run a compile just to get the feel for it

+) Install UAISK
-) Any files that 3DAAK and UAISK share you have to open and edit manually to include the UAISK changes.

+) Copy player.cpp and player.h from the original unaltered T3D install, rename them to t3dplayer.cpp and t3dplayer.h

+) Move t3dplayer.cpp and t3dplayer.h into your 3DAAK T3D EnginesourceT3D directory

+) Open t3dplayer.cpp and t3dplayer.h in Visual Studio 2008/2010, edit each reference of 'player' to 't3dplayer', so every PlayerData is now T3DPlayerData, etc. Make sure to '#include' your t3dplayer whereever 'player' is '#include'ed, setup a 'class' for t3dplayer in t3dplayer.h and '#ifndef' t3dplayer wherever 'player' is. You get the drift; where there's 'player' 't3dplayer' should be as well.

+) In aiplayer.h, I '#ifndef'ed t3dplayer, changed "class AIPlayer : public Player" and "typedef T3DPlayer Parent" to 't3dplayer'

+) Remember to Project>Add Existing Item t3dplayer.cpp and t3dplayer.h to your VS2008/VS2010 project so it compiles.

+) Compile and fix errors as they pop up, this'll probably be trial by error, it's what I did to work out any problems. Most of them will probably be items missed changing from 'player' to 't3dplayer' in your t3dplayer.cpp and t3dplayer.h

+) Setup your character datablocks for UAISK respectively. I also edited the Maco datablocks so he's not referenced as DefaultPlayerData.

+) Comment out aiPlayer.cs in art/datablocks and scripts/server from the exec files, UAISK doesn't use them and it'll only confuse it.

You should be able to launch your 3DAAK build and add in a UAISK character.

You may notice the camera is a bit odd, that's because of something going on in GameCore.cs that I haven't looked at yet. I noticed standard 3DAAK camera comes back commenting it out from the exec, but that also toasts your AI spawning (amongst other things) so you'll need it.

Here's a video of my unarmed (as I have no weapons scripted, this is the basic 3DAAK Empty Template) UAISK Macos running around the player.

 
Logged Logged  
  The administrator has disabled public write access.
#809
Re:UAISK Not working with Ubiq 3D Action Adventure Ki 1 Month ago  
Wow Mack that looks great! Thank you for sharing your hard work so that others may benefit!
 
Logged Logged  
  The administrator has disabled public write access.
#812
Mack ()
User Offline Click here to see the profile of this user
Re:UAISK Not working with Ubiq 3D Action Adventure Ki 3 Weeks, 2 Days ago  
Thanks Justin, Ubiq has made an amazing product. :)

I found what was causing the problem in GameCore.cs, comment out the following in package GameCore:

Code:


   function GameConnection::onClientEnterGame(%this)
   {
      Game.onClientEnterGame(%this);
   }



and

Code:


   function GameConnection::spawnPlayer(%this, %spawnPoint)
   {
      Game.spawnPlayer(%this, %spawnPoint);
   }



This will free up the 3DAAK camera and still allow UAISK spawning/control as demonstrated in this video:



I don't know what the overreaching repercussions of commenting out that code will do, but this and the other above changes will get functionalities from both products working.
 
Logged Logged  
 
Last Edit: 2013/04/27 21:46 By Mack.
  The administrator has disabled public write access.
#814
Mack ()
User Offline Click here to see the profile of this user
Re:UAISK Not working with Ubiq 3D Action Adventure Ki 2 Weeks, 6 Days ago  
Mack wrote:
I don't know what the overreaching repercussions of commenting out that code will do, but this and the other above changes will get functionalities from both products working.

The overreaching repercussions is that the AI becomes unresponsive only to the player. AI will attack other AI, but not the player.

I wondered if this was anything to do with having the separate 't3dplayer' base for the AI, so I built a new project leaving the source as it is other than the 3DAAK changes and integrating UAISK, the same problem persists. There's something within 'onClientEnterGame' and 'spawnPlayer' in GameCore.cs that's causing a problem and I'm not knowledgeable enough to figure it out/integrate the two.

Also a problem with player equipping, but I've opened a new thread for that:

www.ubiqvisuals.com/index.php?option=com...7&id=813#813

I'll continue to dig and test, any suggestions would be appreciated.
 
Logged Logged  
 
Last Edit: 2013/04/30 21:57 By Mack.
  The administrator has disabled public write access.
#815
lornem ()
Ubiq Visuals
User Offline Click here to see the profile of this user
Gender: Male lorneswork.com Location: Vancouver
Re:UAISK Not working with Ubiq 3D Action Adventure Ki 2 Weeks, 3 Days ago  
I'm not actually sure where GameCore.cs is... I can't find it on my install. Perhaps this file is added by the UAISK? Or maybe it's from the "Full" template? (the 3DAAK is based on the "Empty" template).

Anyway, essentially it sounds like both kits rely on onClientEnterGame() and spawnPlayer() to perform some important setup. You'll need to try to merge the changes so both kits are happy.

These script files contain some important code for setting up the 3DAAK camera system (search the files for "ubiq"):
  • Templates\Empty\game\scripts\server\game.cs

  • Templates\Empty\game\core\scripts\server\spawn.cs


If they don't get called, then the 3DAAK camera system (and perhaps other features like checkpoints) won't work as expected.

Lorne
 
Logged Logged  
  The administrator has disabled public write access.
#817
Mack ()
User Offline Click here to see the profile of this user
Re:UAISK Not working with Ubiq 3D Action Adventure Ki 2 Weeks, 3 Days ago  
That's correct, the GameCore.cs is included with the Full templates in Torque 3D. I know Ubiq doesn't support integration of 3DAAK into other templates/kits (understandably because it can create a myriad of support issues) but I appreciate that you posted your suggestion, I came to the same conclusion last night and have been looking into the possible integration of those files. Here's hoping for the best. :)
 
Logged Logged  
  The administrator has disabled public write access.
#818
Mack ()
User Offline Click here to see the profile of this user
Re:UAISK Not working with Ubiq 3D Action Adventure Ki 2 Weeks, 2 Days ago  
The reason why the AI wasn't attacking is because when commenting out onClientEnterGame it skips preparePlayer which contains the UAISK setting to set the player as a hostile team to the AI.

Keep onClientEnterGame and SpawnPlayer commented out in GameCore.cs and add this to game.cs under the SpawnPlayer:

//AISK Changes: Start
//Give the client and player a team
if (%this.team $= "")
%this.team = 1;

//Set the player's team based on the client's team
%this.player.team = %this.team;

//Put the player in a SimSet with its teammates
TeamSimSets(%this.player, %this.player.team);
//AISK Changes: End

Now the AI will attack you.



I'm still testing through functionality to ensure both kits are working as they should, after that I'll be compiling a straightforward resource on getting 3DAAK and UAISK working on the Full template rather than users having to follow my messy posts above. :)
 
Logged Logged  
  The administrator has disabled public write access.
Go to top