Data Realms Fan Forums
http://45.55.195.193/

I'm a novice Lua scripter. Tips on getting into ini modding?
http://45.55.195.193/viewtopic.php?f=1&t=12978
Page 1 of 1

Author:  Shadow Addict [ Wed Dec 10, 2008 1:14 am ]
Post subject:  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.

Author:  Manticore [ Wed Dec 10, 2008 2:05 am ]
Post subject:  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:

Author:  Duh102 [ Wed Dec 10, 2008 2:55 am ]
Post subject:  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.

Author:  ProjektODIN [ Wed Dec 10, 2008 3:03 am ]
Post subject:  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.

Author:  Shadow Addict [ Wed Dec 10, 2008 3:27 am ]
Post subject:  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)?

Author:  TheLastBanana [ Wed Dec 10, 2008 3:28 am ]
Post subject:  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.

Author:  Shadow Addict [ Wed Dec 10, 2008 3:31 am ]
Post subject:  Re: I'm a novice Lua scripter. Tips on getting into ini modding?

Ah thank you, that'll make a huge difference :D

Author:  nihilocrat [ Wed Dec 10, 2008 4:30 am ]
Post subject:  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 :)

Author:  Shadow Addict [ Wed Dec 10, 2008 4:58 am ]
Post subject:  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.

Author:  Lord Tim [ Wed Dec 10, 2008 5:16 am ]
Post subject:  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.

Author:  Duh102 [ Wed Dec 10, 2008 12:20 pm ]
Post subject:  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.

Author:  Kallemort [ Wed Dec 10, 2008 3:53 pm ]
Post subject:  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.

Author:  Duh102 [ Wed Dec 10, 2008 9:07 pm ]
Post subject:  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

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/