Advertisement

Farcry modding

Started by June 08, 2004 03:02 AM
45 comments, last by fagiano 20 years, 2 months ago
Quote: Original post by aarbro

Actually I have one question about the state machine which I'm working with in an entity. I understand a state is a table of functions that replace the "global" events in the entity. When in a state, the events with the same name inside that state are used instead of the "global" ones. Is that right?


Yes you are right. Usually you also have different handlers between client and server.

EntityName.Server.Idle = { OnWhatever = function() end}EntityName.Client.Idle = { OnWhatever = function() end}


that is the common case for multiplayer entities.

Quote:
I know how to start the states but how do I stop using them and return to the ordinary events in the entity?


You can't. if an entity has states, you are always in one state. Usually I create a state 'Idle' that works as normal beahaviour.

ciao
Alberto
-----------------------------The programming language Squirrelhttp://www.squirrel-lang.org
Quote: Original post by bkt
FarCry is totally script access, no engine/C++? The last time I checked people were still awaiting on the SDK for FC, has it come around yet?

I was considering FC because HL2 is taking so god damn long to come out, I decided to bring my game to HL2 because I can start programming on it now (the original SDK is suppose 95 percent 'able to be ported').


I'm not sure what crytek is going to ship with the SDK, I no longer work there. In any case in FC scripts are enough for 90% of the mods you can come out with. The C++ code doesn't have much logic in it. Personally I wouldn't bother with C++.

ciao
Alberto
-----------------------------The programming language Squirrelhttp://www.squirrel-lang.org
Advertisement
Hey guys, thanks for replying to my post. Sorry I haven't responded until now, but I've been busy lately.

I guess it makes sense that people don't mod games until they become more familiar with them and FC hasn't been available for that long. Its just that I see that there are many people here use Lua for scripting and thought it strange that there weren't more post regarding Farcry modding as it uses Lua extensively.

As for Desert Combat, the modders had too resort to brute force hacking to mod it at first (except unlike FC it had model exporters), until DICE released the Battlecraft map editor, which was already being developed by a guy from the modding community and was actually delayed until DICE had released the first expansion pack. AFAIK the closet thing to support they got was probably an early release of the tools.

Hey TangentZ are you working on a mod at the moment? If so which one. Aarbro and I are working on something at the moment and we need all the help we can get.
Thanks, much appreciated fagiano,

I'll use the state machine in a different manner now. I haven't made my entities mp compliant yet but I'll look into that next. First sp that bring me to two new questions:

1. The save and load events: Are anything loaded/saved by default for an entity, such as property values? Or do I have to stream each variable "manually"?

2. Any idea how to capture a key that is pressed and held? I've found a function that captures a single key pressed, Input:GetXKeyPressedName(). However if I want to use it as a steering control for a vehicle it doesn't work. I need to know when the key is down and later released.
Quote: Original post by Anarkist
Hey TangentZ are you working on a mod at the moment? If so which one.


Shhh... It's all hush-hush, for now. [wink]
神はサイコロを振らない!
Sorry I reply only now because in the last days I realocated to another country for a new job. I've been a bit busy :)

Quote: Original post by aarbro
1. The save and load events: Are anything loaded/saved by default for an entity, such as property values? Or do I have to stream each variable "manually"?


Everything that is in the 'Properties' table gets automagically serialized, everything else you want to save has to be explicitly serialized.

Quote: Original post by aarbro
2. Any idea how to capture a key that is pressed and held? I've found a function that captures a single key pressed put:GetXKeyPressedName(). However if I want to use it as a steering control for a vehicle it doesn't work. I need to know when the key is down and later released.


I've got to take a look to a vehicle script to refresh my memory, I do not remeber very well this part. I any case, if you tell me exactly what you are trining to do I can find a more elegant solution rather than polling GetXKeyPressedName().

ciao
-----------------------------The programming language Squirrelhttp://www.squirrel-lang.org
Advertisement
No problem. I've been rather late in replies myself here.

Actually what I'm looking for is a way to create a powered hangglider, like an ordinary aircraft. There was a q about this by NOVA_Maimer at the UBI forum but no solution was found. The idea is to use this combination:

Mouse --roll and pitch
Forward/w --power up
Backward/s --power down
Left/right/a/d --yaw left and right

For instance take the w/s keys, in the hangglider those keys are used for pitch there. I want to make them control the power instead, like engine rpm. But it's not really important what keys are used. Just how to make a variable change when a key is held down. When the key is held down the rpm should increase constantly.

In another project I've been polling GetXKeyPressedName for a trigger entity with success. It's a variant of the ProximityTrigger that can trap any key, not just the USE key. The idea is to make it possible for the player to enter a numerical code on the num keys for instance. It's using polling but only when the player is inside a small area so I don't think it'll be too costly. Still it's crude, if there is a way to get a system event for keys, the better. However, this method is not usable for the aircraft as only a single key pressed is recognized. When held down GetXKeyPressedName replies with nil.

Thanks again for taking the time to helping out and good luck at your new location.
I actually believe the desert combat team MADE the mod tools, with help from Dice (I heard something about this awhile ago).

Anyway, I bought Farcry awhile ago and I am wondering how to mod it.
I should probally just wait till the SDK comes out because that should be ALOT easier.
fagiano if you have time, can you explain the over all architecture of scripting interface to game engine. Also the event system please.
3D Side-Scroller game demo Project-X2 "playable"Lashkar: A 3D Game & Simulation Project demo @ lashkar.berlios.de
Hello I was wondering which Lua libraries where included?

This topic is closed to new replies.

Advertisement