Page 1 of 1

Using rulix AI and adding rx_ff

Posted: 18 Feb 2014, 09:33
by Swartz
I'm trying to add rx_ff from the COP version of Rulix AI to the CS version of Rulix AI.

However, when the game starts it immediately crashes with this:

FATAL ERROR

[error]Expression : fatal error
[error]Function : CScriptEngine::lua_error
[error]File : E:\priquel\sources\engine\xrServerEntities\script_engine.cpp
[error]Line : 180
[error]Description : <no expression>
[error]Arguments : LUA error: rx_ai.script:254: attempt to call field 'set_scheme' (a nil value)

lua stack:
[ 9|-1] (no value):
[ 8|-2] (string): `attempt to call field 'set_scheme' (a nil value)'
[ 7|-3] (string): `rx_ff'
[ 6|-4] (string): `rx_ff'
[ 5|-5] (userdata): userdata (7510EB40)
[ 4|-6] (userdata): userdata (75105998)
[ 3|-7] (nil): nil
[ 2|-8] (userdata): userdata (75105998)
[ 1|-9] (userdata): userdata (7510EB40)



stack trace:


All I did was plunk rx_ff.script into the scripts folder and add it to load_schemes and enable_schemes in rx_ai.script. I also put rx_utils.script in there since rx_ff uses it.

Here's rx_ai.script: http://pastebin.com/US2yXdSm

Here's rx_ff.script: http://pastebin.com/Y7CKEj4k

And here is a directory that has both the CS and COP versions of Rulix AI: http://rghost.net/users/rulix/releases

--
I'm assuming there's something in rx_ff.script that does not compute with CS. If you'd be willing to take a look I'd really appreciate it but I realize you're very busy and may not be all that familiar with CS scripts so if not I understand.

I really was hoping to get rx_ff working in CS as friendly fire is a major problem in CS that I've never seen solved. I get shot by my own faction buddies all the time by mistake.

Re: Using rulix AI and adding rx_ff

Posted: 18 Feb 2014, 17:33
by Alundaio
That's odd, it can't find set_scheme, even though it is right there. Must mean the script is failing to compile. Run Xetril's luaCheck.exe and see if it has any errors.

There is no download button for the CS version of AI Additions. I need to winmerge them to see what the difference is.

Does the CS of rx_ff version not work?

Re: Using rulix AI and adding rx_ff

Posted: 18 Feb 2014, 17:57
by Swartz
There is no rx_ff in the CS version, same with SOC.

Here's a working link to the CS version: http://www.mediafire.com/download/zq3sp ... add_CS.rar

I'll run luacheck and if it finds anything I'll update this post.

*Edit*
I'm too dumb to run luacheck.

I downloaded lua.exe and other files from the official LUA site and put them in the scripts folder with it but it didn't help run it.

*Edit 2*
Got it working. No syntax errors.

Re: Using rulix AI and adding rx_ff

Posted: 18 Feb 2014, 18:45
by Alundaio
http://pastebin.com/WsXMwqyb


Try that. It was trying to call non-existent rx_ai functions.

Re: Using rulix AI and adding rx_ff

Posted: 18 Feb 2014, 19:00
by Swartz
Thanks, now it doesn't crash.

AI still seems stupid though, still accidentally getting shot but maybe a little less.

I wonder if rx_ff even works normally.

Re: Using rulix AI and adding rx_ff

Posted: 18 Feb 2014, 19:34
by Alundaio
I'm not sure it ever worked either.

Re: Using rulix AI and adding rx_ff

Posted: 08 Mar 2014, 00:20
by Alundaio
What kind of CS mod are you working on?

Re: Using rulix AI and adding rx_ff

Posted: 08 Mar 2014, 09:27
by Swartz
Just a general overhaul. I ported over r_populik's OWR2, using new arm models, better faction wars from some various mini-mods, better weather, sound, etc.