View unanswered posts | View active topics It is currently Mon Oct 07, 2024 7:53 pm



Reply to topic  [ 8 posts ] 
 Help With Scripting 
Author Message

Joined: Fri Feb 05, 2010 4:28 am
Posts: 3
Reply with quote
Post Help With Scripting
Hey Guys!
I am a professional programmer and just came across this game a few days ago.
It's embarrassing how much I play it now. My iPhone clients are complaining!
Anyway, there obviously isn't much doc for modding so I've just been hacking around. However, so many people on these forums
seem to know so much about modding. Are there any good sites beside the wiki that provide more documentation?
Are you guys just look at the files that come pre-packaged with the game? Could you guys post a few templates for weapons I could
study? How are you fellows figuring all this out about the game?
Thanks, and rock on!
Sam


Fri Feb 05, 2010 4:33 am
Profile
User avatar

Joined: Sun Aug 09, 2009 9:26 am
Posts: 1633
Reply with quote
Post Re: Help With Scripting
Alright, Sam, I may not be some big city sparkle mage, but I know a bit. First off, take a look at This topic. It provides many templates and guides. Also, the language they use in the scripting is, at least for the ini files, very easy to understand. I would suggest you read that, and then take a look at some ronin.rte files, I find them the easiest to fiddle with.


Fri Feb 05, 2010 5:27 am
Profile

Joined: Fri Feb 05, 2010 4:28 am
Posts: 3
Reply with quote
Post Re: Help With Scripting
Sweet. Thanks man. However, I've already looked at those pages. I haven't seen any good tutorial on attaching a Lua script to objects and the relation between the ini files and the Lua scripts. I mainly want to do Lua scripting since I like the power it provides (and since I already know it :) )
Anyway, if anyone could suggest some good tutorials or templates for Lua scripted weapons, that would be great.
Sam


Fri Feb 05, 2010 5:47 am
Profile
Banned
User avatar

Joined: Tue Feb 27, 2007 4:05 pm
Posts: 2527
Reply with quote
Post Re: Help With Scripting
You will have better luck looking at actual Lua documentation, seeing as function hooks into the game are similar to just about anything else (barring method titles).


Fri Feb 05, 2010 6:36 am
Profile YIM

Joined: Fri Feb 05, 2010 4:28 am
Posts: 3
Reply with quote
Post Re: Help With Scripting
Dude, are you talking about the Lua docs on this site?
If so, they're not very comprehensive. I already read the Lua docs on the lua site.
I don't quite get what you mean...


Fri Feb 05, 2010 6:38 am
Profile
User avatar

Joined: Mon Jun 29, 2009 2:40 am
Posts: 610
Location: Deep below The Map of Mars
Reply with quote
Post Re: Help With Scripting
I just dug into some mods that already had lua scripting, and by the glory of logical mapping learned how to implement what I wanted.
I recommend looking at the Darkstorm, the HL2 Gravity Guns, the Experimental Dummy Vehicles, and the Particle Accelerator.

Also, there is, of course, an entire section of the modding forum for lua, and most treads either ask a question (worth learning the answer) or discuss implementing something.

Don't let CC devour you, but the community could use another user fluent in game scripting in lua.


Fri Feb 05, 2010 6:39 am
Profile
Banned
User avatar

Joined: Tue Feb 27, 2007 4:05 pm
Posts: 2527
Reply with quote
Post Re: Help With Scripting
flashpro wrote:
Dude, are you talking about the Lua docs on this site?
If so, they're not very comprehensive. I already read the Lua docs on the lua site.
I don't quite get what you mean...
Then you aren't a professional programmer.


Fri Feb 05, 2010 6:59 am
Profile YIM
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post Re: Help With Scripting
All content within the game is created using the variable-based .ini modding format. It's quite simplistic and extremely easy to master, but contains no logic of any kind, and is in fact extremely limited.

Lua can be attached to any object within the game, using three basic run functions: Create, Update, and Destroy, which are fairly self explanatory.

The basic structure of CC's Lua is exactly the same as any other implementation of Lua (and perfectly standard Lua, for that matter). The only differences are functions and variables. A better understanding of variables can be gained by spending more time with .ini modding, and learning what functions do and how to use them is the majority of what lua modding adds up to.


Fri Feb 05, 2010 7:17 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 8 posts ] 

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.049s | 14 Queries | GZIP : Off ]