Author |
Message |
Shadow Addict
Joined: Sat Dec 06, 2008 5:58 am Posts: 10
|
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 |
|
|
Manticore
Joined: Tue Nov 18, 2008 1:03 am Posts: 342 Location: Spathiwa
|
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
|
Wed Dec 10, 2008 2:05 am |
|
|
Duh102
happy carebear mom
Joined: Tue Mar 04, 2008 1:40 am Posts: 7096 Location: b8bbd5
|
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 |
|
|
ProjektODIN
Banned
Joined: Tue Aug 26, 2008 6:09 pm Posts: 432
|
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 |
|
|
Shadow Addict
Joined: Sat Dec 06, 2008 5:58 am Posts: 10
|
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 |
|
|
TheLastBanana
DRL Developer
Joined: Wed Dec 13, 2006 5:27 am Posts: 3138 Location: A little south and a lot west of Moscow
|
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 |
|
|
Shadow Addict
Joined: Sat Dec 06, 2008 5:58 am Posts: 10
|
Re: I'm a novice Lua scripter. Tips on getting into ini modding?
Ah thank you, that'll make a huge difference
|
Wed Dec 10, 2008 3:31 am |
|
|
nihilocrat
Joined: Mon Dec 01, 2008 5:31 pm Posts: 22
|
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 |
|
|
Shadow Addict
Joined: Sat Dec 06, 2008 5:58 am Posts: 10
|
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 |
|
|
Lord Tim
Joined: Fri Apr 27, 2007 4:55 pm Posts: 1178 Location: America!
|
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 |
|
|
Duh102
happy carebear mom
Joined: Tue Mar 04, 2008 1:40 am Posts: 7096 Location: b8bbd5
|
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 |
|
|
Kallemort
Joined: Tue Aug 21, 2007 2:55 pm Posts: 948
|
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 |
|
|
Duh102
happy carebear mom
Joined: Tue Mar 04, 2008 1:40 am Posts: 7096 Location: b8bbd5
|
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 |
|
|
|