Page 1 of 2

Having trouble with making my own little mod.

Posted: 25 Jan 2011, 16:29
by SonOfWolf
Hey guys. I am having a little trouble.

I am following this tutorial

Code: Select all

http://springrts.com/wiki/The_Complete_Guide_To_Making_A_Spring_Game
I have made my little tank etc and the game sees it.

I used the mod provided called "Empty Game plus Tank" and I just replaced the tank3.3d0 and the texture for it in the mod.

When I try starting the game it loads up and then when the countdown to begin reaches zero the game crashes with error message written to "infolog.txt"

I was wondering if you guys could help me get my mod to work as I really want to get into modding.

Re: Having trouble with making my own little mod.

Posted: 25 Jan 2011, 16:37
by BaNa
post the infolog here (use pastebin), that should help with troubleshooting.

Re: Having trouble with making my own little mod.

Posted: 25 Jan 2011, 17:41
by SonOfWolf
BaNa wrote:post the infolog here (use pastebin), that should help with troubleshooting.

This is my infolog.txt paste

Code: Select all

http://pastebin.com/WaDrW3Mb

Re: Having trouble with making my own little mod.

Posted: 25 Jan 2011, 18:01
by Beherith
Did you assign both a texture 1 and texture 2 to it in upspring? Are both of those textures in the folder unittextures?

Re: Having trouble with making my own little mod.

Posted: 25 Jan 2011, 18:17
by SonOfWolf
Beherith wrote:Did you assign both a texture 1 and texture 2 to it in upspring? Are both of those textures in the folder unittextures?
no, I only had one texture in on my unit. If I use my unit and text in the empty mod, it appears in game and is textured.


It can move about but cannot shoot.

Re: Having trouble with making my own little mod.

Posted: 25 Jan 2011, 19:52
by SeanHeron
May be a simple typo on your side, but you write you replaced "tank3.3d0" , but in the infolog it says it couldn't find tank3.s3o .
So if that wasn't a typo, maybe you made a mistake renaming your file ? (Or of course you actually have it saved in 3do format, in which case I'd guess you'd have to change the unitdef [units/tank.lua] to point to a .3do file rather than the s3o).

Re: Having trouble with making my own little mod.

Posted: 25 Jan 2011, 20:06
by PTSnoop
I used the mod provided called "Empty Game plus Tank" and I just replaced the tank3.3d0 and the texture for it in the mod.
Hang on. Do you mean you replaced the original tank3.s3o with a new model called tank3.3d0 ?

The Spring engine supports 3do and s3o model formats, which are different to each other. The basic difference, as far as I can tell, is that 3do was used by OTA and handles textures differently.

If you're following the tutorial, then you should end up with a .s3o model, not a .3do. The solution should probably be to open up the model in UpSpring again and save as a .s3o .

If you're following other older tutorials as well, and really do have a properly textured .3do, then you'll just need to open up units/tank.lua and change 'ObjectName = "tank3.s3o" ' to 'ObjectName = "tank3.3do" '.

Hope this helps.

Re: Having trouble with making my own little mod.

Posted: 25 Jan 2011, 20:11
by SonOfWolf
PTSnoop wrote:
I used the mod provided called "Empty Game plus Tank" and I just replaced the tank3.3d0 and the texture for it in the mod.
Hang on. Do you mean you replaced the original tank3.s3o with a new model called tank3.3d0 ?

The Spring engine supports 3do and s3o model formats, which are different to each other. The basic difference, as far as I can tell, is that 3do was used by OTA and handles textures differently.

If you're following the tutorial, then you should end up with a .s3o model, not a .3do. The solution should probably be to open up the model in UpSpring again and save as a .s3o .

If you're following other older tutorials as well, and really do have a properly textured .3do, then you'll just need to open up units/tank.lua and change 'ObjectName = "tank3.s3o" ' to 'ObjectName = "tank3.3do" '.

Hope this helps.

Okay that completly confused me sorry.

Code: Select all

http://rapidshare.com/files/444511767/tankmod.sdz
this is my mod how I have it at the moment

Re: Having trouble with making my own little mod.

Posted: 25 Jan 2011, 20:30
by PTSnoop
I think I've found the problem. Ignore everything I said before; I was misinterpreting what you were saying.

The problem was, on the model in Upspring, you've labelled some of your pieces "Body", "Turret" and "Gun", but the script was looking for "body", "turret" and "gun". These labels are case sensitive.

All you have to do is open the model in Upspring and rename "Body", "Turret", and "Gun" to all lower case.

Re: Having trouble with making my own little mod.

Posted: 25 Jan 2011, 21:46
by SonOfWolf
PTSnoop wrote:I think I've found the problem. Ignore everything I said before; I was misinterpreting what you were saying.

The problem was, on the model in Upspring, you've labelled some of your pieces "Body", "Turret" and "Gun", but the script was looking for "body", "turret" and "gun". These labels are case sensitive.

All you have to do is open the model in Upspring and rename "Body", "Turret", and "Gun" to all lower case.
Still crashes, same error message.

Re: Having trouble with making my own little mod.

Posted: 25 Jan 2011, 23:56
by SonOfWolf
Okay sucess! After a fashion anyway.

I now have the basic mod. You start with a base. The base makes my tank and a builder and the builder can make a base, and an energy generating thingy. lol


The problem now is my tank cant attack. The button is there but it does nothing..

Sorry for being a noob guys!..

Code: Select all

http://rapidshare.com/files/444551054/MyMod.sdz

Re: Having trouble with making my own little mod.

Posted: 26 Jan 2011, 01:11
by MidKnight
Congratulations!
Thank you for being patient and articulate when asking for help! :mrgreen:

Re: Having trouble with making my own little mod.

Posted: 26 Jan 2011, 01:41
by SonOfWolf
MidKnight wrote:Congratulations!
Thank you for being patient and articulate when asking for help! :mrgreen:
Could someone take a look and help getting it to shoot? :)

Re: Having trouble with making my own little mod.

Posted: 26 Jan 2011, 01:47
by PTSnoop
I get the error message:
[f=0000088] LuaRules::RunCallIn: error = 2, UnitCreated, [string "scripts/tankscript.lua"]:1: piece not found: base
And looking at the new tank3.s3o in UpSpring again, there's no piece "base", but there's a piece "Tank.3ds"; if you rename that to "base", it should work. Or you could just delete the line 'local base = piece "base" ' from the top of scripts/tankscript.lua, since it doesn't actually do anything.

Having said that, your model apparently still has the pieces "Body", "Turret" and "Gun" with capital letters, so I could be looking at an older model version. Either way, they need to be all small letters.

With luck, unlike my earlier comments, this'll actually fix something...

Re: Having trouble with making my own little mod.

Posted: 26 Jan 2011, 02:23
by SonOfWolf
PTSnoop wrote:I get the error message:
[f=0000088] LuaRules::RunCallIn: error = 2, UnitCreated, [string "scripts/tankscript.lua"]:1: piece not found: base
And looking at the new tank3.s3o in UpSpring again, there's no piece "base", but there's a piece "Tank.3ds"; if you rename that to "base", it should work. Or you could just delete the line 'local base = piece "base" ' from the top of scripts/tankscript.lua, since it doesn't actually do anything.

Having said that, your model apparently still has the pieces "Body", "Turret" and "Gun" with capital letters, so I could be looking at an older model version. Either way, they need to be all small letters.

With luck, unlike my earlier comments, this'll actually fix something...
Wow. Thanks so much! :)

My unit is working. Turret turns and it shoots :)

Sorry If I seem over enthusiastic but I have tried many times before to mod this game and I always give up!

So now it works completely. I can try making my own base etc.

Expect to hear from me more in the future :)

Re: Having trouble with making my own little mod.

Posted: 26 Jan 2011, 02:39
by PTSnoop
Congratulations!

Re: Having trouble with making my own little mod.

Posted: 26 Jan 2011, 02:53
by SonOfWolf
PTSnoop wrote:Congratulations!
Okay im back haha, How do I make the base show the wireframe of my unit when it is building it?

Re: Having trouble with making my own little mod.

Posted: 26 Jan 2011, 08:22
by FLOZi
I'll take a look when I get home.

edit: Nevermind, see you got all your stuff fixed, congrats. :-)

Re: Having trouble with making my own little mod.

Posted: 26 Jan 2011, 15:35
by knorke
hey welcome
pro tip: if you dont put links in

Code: Select all

 tags there are clickable ;)

[quote]How do I make the base show the wireframe of my unit when it is building it?[/quote]the wireframe of the builder unit is visible when it is being built. So the factory works.
I think the tank is missing the wireframe because of the errors in its script (piece "base", others explained)
Seems like units with scripterrors show no wireframe.

also please rename your mod to something that makes sense like Wolfmod.sdz or w/e instead of MyMod.sdz and also in modinfo.txt fill out all the keys. Of course does not really matter when the mod is on your HDD but when you show it to others (even if just for error searching) it makes things much easier. Like appereantly there already was a "example mod" in my folder, confused me a bit  :roll:

instead of changing piece names in upspring, you can also change piece names in the script which is usually faster than opening the model, saving etc.

hope you know about these commands, it makes modding much easier:
http://answers.springlobby.info/questions/393/how-can-i-easily-test-my-mod

Re: Having trouble with making my own little mod.

Posted: 26 Jan 2011, 17:14
by SonOfWolf
knorke wrote:hey welcome
pro tip: if you dont put links in

Code: Select all

 tags there are clickable ;)
[/quote]


Oh sorry habbit. Another forum I am on, they tell you to code all links lol. I will take a look a renaming the peices etc and report back :)