View unanswered posts | View active topics It is currently Tue Jan 07, 2025 1:07 am



Reply to topic  [ 13 posts ] 
 I'm a novice Lua scripter. Tips on getting into ini modding? 
Author Message

Joined: Sat Dec 06, 2008 5:58 am
Posts: 10
Reply with quote
Post I'm a novice Lua scripter. Tips on getting into ini modding?
I've been scripting Lua (not for any game) for a month or two now, and I have a decent grasp of it. I've been messing with the console and I'm starting to understand it a bit better. However, I look at inis and I'm just blown away (I've never modded before). I understand things like the basic weapon variables, but other stuff confuses the hell out of me. (For example, when looking at positions, how do I know where the point is? I can't really figure it out.) Any tips would be appreciated, as I love CC and I want to be able to mod it desperately.


Wed Dec 10, 2008 1:14 am
Profile
User avatar

Joined: Tue Nov 18, 2008 1:03 am
Posts: 342
Location: Spathiwa
Reply with quote
Post Re: I'm a novice Lua scripter. Tips on getting into ini modding?
while i cant help you at all with lua(ive decided to let bigger and better modders do that[though ive always want to try it]) i would recomend downloading a craptastic mod and fiddel around with it for a while figuring out how stuff works in game.(also watching your little mod do what you wanted it to is the greatest feeling ever)


btw welcome to the forum

EDIT: check out the wiki it has tons of tasty info :twisted:


Wed Dec 10, 2008 2:05 am
Profile
happy carebear mom
User avatar

Joined: Tue Mar 04, 2008 1:40 am
Posts: 7096
Location: b8bbd5
Reply with quote
Post Re: I'm a novice Lua scripter. Tips on getting into ini modding?
You don't need to know Lua to do most modding things. Right now, Lua is only able to be used in scenes. For general modding, here's a few tips.
1. Read LordTim's tutorials
2. Read the Wiki
3. Start with TDExplosives or Devices, actors are a pain
Now, offsets. If you start from the middle of the object (making the sprite offset -(width / 2) and -(height / 2)) up and left is negative, down and right is positive. So, a pixel two pixels down and three pixels left of your offset would be (-3, 2) from your offset. Drawing yourself a graph (or using a computer to do the same) can be really helpful at times.


Wed Dec 10, 2008 2:55 am
Profile
Banned

Joined: Tue Aug 26, 2008 6:09 pm
Posts: 432
Reply with quote
Post Re: I'm a novice Lua scripter. Tips on getting into ini modding?
Paraphrasing the above superposts:

Lua isn't necessary to create units and weapons. Lua is used for scenes and events.


Wed Dec 10, 2008 3:03 am
Profile

Joined: Sat Dec 06, 2008 5:58 am
Posts: 10
Reply with quote
Post Re: I'm a novice Lua scripter. Tips on getting into ini modding?
Well I mainly want to do scenes and events anyway. Also, I have a question: judging from the fact that x=0 seems to be the very top limit of the map and that y=0 seems to be the limit to the left, would that mean that the top-left corner = (0,0)?


Wed Dec 10, 2008 3:27 am
Profile
DRL Developer
DRL Developer
User avatar

Joined: Wed Dec 13, 2006 5:27 am
Posts: 3138
Location: A little south and a lot west of Moscow
Reply with quote
Post Re: I'm a novice Lua scripter. Tips on getting into ini modding?
As with almost anything involving computer programming, (0,0) is the top-left coordinate of the screen, probably because the point is to fill the screen with pixels and to make varying resolutions easier to handle.
tl;dr
Yes.


Wed Dec 10, 2008 3:28 am
Profile WWW

Joined: Sat Dec 06, 2008 5:58 am
Posts: 10
Reply with quote
Post Re: I'm a novice Lua scripter. Tips on getting into ini modding?
Ah thank you, that'll make a huge difference :D


Wed Dec 10, 2008 3:31 am
Profile

Joined: Mon Dec 01, 2008 5:31 pm
Posts: 22
Reply with quote
Post Re: I'm a novice Lua scripter. Tips on getting into ini modding?
Duh102 wrote:
Drawing yourself a graph (or using a computer to do the same) can be really helpful at times.


You mean no-one has made a tool to quickly see how everything lines up?

Sounds like I need to see what I can do about that...

TheLastBanana wrote:
As with almost anything involving computer programming, (0,0) is the top-left coordinate of the screen, probably because the point is to fill the screen with pixels and to make varying resolutions easier to handle.
tl;dr
Yes.


With 2d graphics libs, yes, but OpenGL by default uses the 'correct' coordinate system where positive Y actually goes up. Technically you can set the coordinate system to whatever you want with a glOrtho call or Viewport / projection matrix calls.

Sorry, couldn't resist being a smartass :)


Wed Dec 10, 2008 4:30 am
Profile

Joined: Sat Dec 06, 2008 5:58 am
Posts: 10
Reply with quote
Post Re: I'm a novice Lua scripter. Tips on getting into ini modding?
Yeah the whole "-y is up" thing was really confusing to me at first considering my only experience with coordinates is from Algebra I. I eventually figured it out but I didn't understand it until I realized top-left corner is the origin.


Wed Dec 10, 2008 4:58 am
Profile
User avatar

Joined: Fri Apr 27, 2007 4:55 pm
Posts: 1178
Location: America!
Reply with quote
Post Re: I'm a novice Lua scripter. Tips on getting into ini modding?
It's more like as if you were reading a book. You start in the top left, and go right. Then down. That's how the pixels are organized.

It makes a lot more sense if you understand how the whole thing is organized behind the scenes.


Wed Dec 10, 2008 5:16 am
Profile
happy carebear mom
User avatar

Joined: Tue Mar 04, 2008 1:40 am
Posts: 7096
Location: b8bbd5
Reply with quote
Post Re: I'm a novice Lua scripter. Tips on getting into ini modding?
nihilocrat wrote:
You mean no-one has made a tool to quickly see how everything lines up?

Someone did make one, a while back... I think it was hard to use though, and it's been lost since then. It looked pretty nice. It did actors, craft, devices, lots of stuff.


Wed Dec 10, 2008 12:20 pm
Profile
User avatar

Joined: Tue Aug 21, 2007 2:55 pm
Posts: 948
Reply with quote
Post Re: I'm a novice Lua scripter. Tips on getting into ini modding?
Duh102 wrote:
nihilocrat wrote:
You mean no-one has made a tool to quickly see how everything lines up?

Someone did make one, a while back... I think it was hard to use though, and it's been lost since then. It looked pretty nice. It did actors, craft, devices, lots of stuff.

Wait, you talking about Monky's modding program?
Never finished.


Wed Dec 10, 2008 3:53 pm
Profile
happy carebear mom
User avatar

Joined: Tue Mar 04, 2008 1:40 am
Posts: 7096
Location: b8bbd5
Reply with quote
Post Re: I'm a novice Lua scripter. Tips on getting into ini modding?
Kallemort wrote:
Wait, you talking about Monky's modding program?

Whatever this chunk of bits I downloaded a while ago is...
Attachment:
Offset editor.rar


Wed Dec 10, 2008 9:07 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 13 posts ] 

Who is online

Users browsing this forum: Google [Bot]


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.043s | 14 Queries | GZIP : Off ]