PDA

View Full Version : Got Co-op to work... kinda.



tootsieef
03-24-2004, 10:40 AM
Okay here's what I did:

1. Loaded a singleplayer mission in the editor, duplicated the SP mission and renamed it to "ffa".
2. Added player and spectator spawn points and a player equipment selection.
3. Saved the level as "mp_research" (the original was 'research').
4. Loaded the new map, ran the automatic texture generator tool under Files as there were no land textures in the level.
5. Loaded the game, ran the level under FFA. To my surprise the scripting and AIs were still in the level following their waypoints.

But when I joined the level from another computer (copied the map to the other computer) on the network the client could not see any of the AIs, yet the AIs did respond to the clients presence and killed him. http://ubbxforums.ubi.com/images/smiley/51.gif

So basically only the host computer could see any of the enemies. I haven't experimented anymore with it yet because, well, I haven't beaten the SP game and it's addictive as hell.

tootsieef
03-24-2004, 10:40 AM
Okay here's what I did:

1. Loaded a singleplayer mission in the editor, duplicated the SP mission and renamed it to "ffa".
2. Added player and spectator spawn points and a player equipment selection.
3. Saved the level as "mp_research" (the original was 'research').
4. Loaded the new map, ran the automatic texture generator tool under Files as there were no land textures in the level.
5. Loaded the game, ran the level under FFA. To my surprise the scripting and AIs were still in the level following their waypoints.

But when I joined the level from another computer (copied the map to the other computer) on the network the client could not see any of the AIs, yet the AIs did respond to the clients presence and killed him. http://ubbxforums.ubi.com/images/smiley/51.gif

So basically only the host computer could see any of the enemies. I haven't experimented anymore with it yet because, well, I haven't beaten the SP game and it's addictive as hell.

DawnEyes
03-24-2004, 10:50 AM
Not to repeat what you sayed but I too have te same problem... Whether I modify a SP map to multiplayer by renaming to FFA or if I created AI Enemies in a multiplayer map, only the host sees the models and yet they react to the other user connected to the host.

Does anyone know if this is an Editor function that I am not doing correctly or does the games need aditional programing, other than editor functions to work in a Coop TYPE of contect ?

Thanmk you http://ubbxforums.ubi.com/infopop/emoticons/icon_wink.gif

antistar_
03-24-2004, 10:58 AM
Did you export the level first, before saving it? Levels won't work properly in the game if you don't export them first. Choose Export to Engine from the File menu, or press Control-E.

Hmmm... I shall save these up for the FAQ I think http://ubbxforums.ubi.com/infopop/emoticons/icon_smile.gif.

aka Tim Partlett

tootsieef
03-24-2004, 11:04 AM
As it is written; So it shall be done!

DawnEyes
03-24-2004, 11:25 AM
Yes I did export the level to editor... I also generated the AI.

Moreover I have exported and generated AI again on the user PC connecting to host after having copyed the level map to the other PC.

Same thing... have the label of the model there but no visual on non-host PC.

? http://ubbxforums.ubi.com/infopop/emoticons/icon_smile.gif Any ideas ?

Quachee
03-24-2004, 11:44 AM
Ok, it is NOT as easy as that, there are MANY issues involved. Firstly, the AI players are not correctly initialized client side, they rely on server side components to load the entity model. Secondly they are not net synched, so even if you fix the model loading they will not move on the clients. Also they have problems when it comes to dying. They cause net synch issues. The list goes on.

DawnEyes
03-24-2004, 11:55 AM
Oh Nooooooo ! http://ubbxforums.ubi.com/infopop/emoticons/icon_wink.gif Ah well... I feared it would not be that easy when I cheaked out the Coop Mod for the demo http://ubbxforums.ubi.com/infopop/emoticons/icon_wink.gif Well thank you for the information. Hopefully a coop patch... official or not http://ubbxforums.ubi.com/infopop/emoticons/icon_wink.gif will be eventually relesed. My knoledge of moding is not that expansive yet http://ubbxforums.ubi.com/infopop/emoticons/icon_wink.gif

Quachee
03-24-2004, 12:16 PM
Not having the full version yet I can't really say exactly what will be needed on the final build, but, maybe I can get your AI players to move for you.

you need to make the players model load when initialized. If you look in BasicAI.lua in the scripts, you should be able to see the point at which the models load. This is in Server_OnInit() . There should be two lines

self:LoadCharacter(self.Properties.fileModel,0);
self.temp_ModelName = self.Properties.fileModel;

Comment these out, and locate the client init routine Client_OnInit()

put a line at the start of this routine

self:OnPropertyChange();

This should then load the player model on both server and client.

Lastly, find the OnReset() routine, and add

self:NetPresent(1);

To the end of this routine.

This is by no means a complete solution to COOP but hopefully it will get your characters moving assuming the full version is not too different from the demo.

Good luck.

DawnEyes
03-24-2004, 01:50 PM
I did what you said and I get the results that you mention in your read me from the demo.

Well its a good step in the right direction http://ubbxforums.ubi.com/infopop/emoticons/icon_smile.gif Thank you http://ubbxforums.ubi.com/infopop/emoticons/icon_smile.gif

MacBosse
03-25-2004, 02:00 AM
Great guys! Keep the co-op work for Far cry alive!

ddraigcymraeg
03-25-2004, 08:40 AM
<BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by MacBosse:
Great guys! Keep the co-op work for Far cry alive!<HR></BLOCKQUOTE>

I second that!!! This game is meant for COOP http://ubbxforums.ubi.com/infopop/emoticons/icon_biggrin.gif

JoJoNL
03-25-2004, 04:46 PM
Make it into a mmorpg. Full with diverent cartels who each own an island!!!http://ubbxforums.ubi.com/infopop/emoticons/icon_biggrin.gif
My dream....

JonnyY88
03-25-2004, 10:38 PM
speaking of the mmorpg thing - this engine with its physics could make some pretty wicked castle siege flibbidy jibbidys if you know what I'm saying.

I can't mod or edit worth a crap but I made the sweetest castle level possible. AND THEN I PLAYED IT

AceflierR
04-01-2004, 11:43 AM
wierd i just stumbled across the same thing as you did i never read this thread before by the way. But i sent the whole level to a friend we played it and we could both see the bots. Dont ask how i did it(Never generated AI?) i duno exactly but it worked we could both see and kill the AI so did the demo mission and some of the physics. I plan to clone all the bots so we double our enemies. Im trying to get physics to work online(as per nil change to 1 lua file instructions) but I can't figure out how to make a mod version of mission and the scripts folder anyone know exactly how to do that the sticky in the forum is too vague for me to follow a step by step tutorial would be nice.Start from the beginning plz starting with what to open the .pak file with and how to repack it. I'm a noob to this so plz be detailed.

http://aceflier.home.mchsi.com/rise_above_the_rest2.gif

[This message was edited by AceflierR on Thu April 01 2004 at 10:56 AM.]