Games not loading models

Games not loading models

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

User avatar
The_Igishly_Co
Posts: 34
Joined: 10 Oct 2013, 01:56

Games not loading models

Post by The_Igishly_Co »

Hello again,
Sorry to intrude again, but we've hit a snag here at TIG HQ... I have successfully turned my 3D model into a .s30 file. However, when i load the game (even the test game just to make sure it wasn't my coding) no game 3D models are loaded... I am wondering as to why this is. If you have any answers or assistance at all. We here at The Igishly Company would be greatly appreciative.
-Signed: The Igishly Company
Attachments
infolog.txt
My infolog, I went over it myself, nothing directly related to my problem, but I've got faith that you guys can find something
(8.08 KiB) Downloaded 28 times
Last edited by The_Igishly_Co on 11 Oct 2013, 18:18, edited 1 time in total.
gajop
Moderator
Posts: 3051
Joined: 05 Aug 2009, 20:42

Re: Games not loading models

Post by gajop »

It's usually helpful to post your infolog.txt.
User avatar
Silentwings
Posts: 3720
Joined: 25 Oct 2008, 00:23

Re: Games not loading models

Post by Silentwings »

Did you mean s3o ?

Maybe worth attaching your file as well...
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Games not loading models

Post by knorke »

If you load an unedited spring game, that works?
if not: http://springrts.com/wiki/Infolog.txt and a screenshot

If only your own 3d models fail to show, check this page:
http://springrts.com/wiki/Trouble-shoot ... sible_Unit
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10453
Joined: 24 Jan 2006, 21:12

Re: Games not loading models

Post by PicassoCT »

Your model has to be mentioned in the unitdef

Also if the error persists.. post the model.. or at least a screenshot of how it is loaded in upspring?
http://springfiles.com/spring/tools/upspring

Do not despair, deving is hard and slow at the start. But becomes wonderfull if you stick to it.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6241
Joined: 29 Apr 2005, 01:14

Re: Games not loading models

Post by FLOZi »

Does the model have a texture2 applied in Upspring? if so be aware that alpha channel is 1-bit transparency.
User avatar
The_Igishly_Co
Posts: 34
Joined: 10 Oct 2013, 01:56

Re: Games not loading models

Post by The_Igishly_Co »

Okay, when I say the game is not loading models, I meant that the game is not loading objects. And when I load a game that is supposed to have a basic tank model in game. There is in fact nothing there except the map... How do I get this fixed, my infotext file is in the original post.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6241
Joined: 29 Apr 2005, 01:14

Re: Games not loading models

Post by FLOZi »

Does

"/cheat"
followed by
"/give all"

Spawn any units?
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Games not loading models

Post by knorke »

[f=0000000] Using map: Mamap 1.8
[f=0000000] Using game: Empty Mod plus Tank
Those are not map/games where I would be 100% certain that they work.
Map I have never seen (is it yours?) and the game is some example-game but not 100% sure if it works, it is a bit old.

Try this game http://springfiles.com/spring/games/bal ... ilation-43 on this map http://springfiles.com/spring/spring-maps/smalldivide just to be sure that your spring install works.
[f=0000000] Error: Failed to load: precipitation.lua ([string "LuaGaia/Gadgets/precipitation.lua"]:54: Precipitation-Gadget: Can't find settings in mapinfo.lua!)
Broken map/gadget? Is that your map?
User avatar
The_Igishly_Co
Posts: 34
Joined: 10 Oct 2013, 01:56

Re: Games not loading models

Post by The_Igishly_Co »

FLOZi wrote:Does

"/cheat"
followed by
"/give all"

Spawn any units?
Dear helpful chap in the front,
YES, thank you SO much... It spawned the unit and I am a happy happy little boy! Thank you once again! And is there any way that I ca make it so that it's there by default?
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Games not loading models

Post by knorke »

And is there any way that I ca make it so that it's there by default?
you need a lua script. in your game it is called "spawnplayer.lua" and in luarules\gadgets, but for some reason it does not work..
User avatar
The_Igishly_Co
Posts: 34
Joined: 10 Oct 2013, 01:56

Re: Games not loading models

Post by The_Igishly_Co »

knorke wrote:
but for some reason it does not work..
Is there a working script out there that I can use?
User avatar
The_Igishly_Co
Posts: 34
Joined: 10 Oct 2013, 01:56

Re: Games not loading models

Post by The_Igishly_Co »

knorke wrote:
And is there any way that I ca make it so that it's there by default?
you need a lua script. in your game it is called "spawnplayer.lua" and in luarules\gadgets, but for some reason it does not work..
And in the game is the spawn function called?
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Games not loading models

Post by knorke »

Was that the example download from http://springrts.com/wiki/The_Complete_ ... pring_Game ?
Those are a bit outdated, I will add warning to wiki.

Think problem is that the script tries to read team data of player but in testgames via spring.exe that is not set or something.
Basically what line 47 in this spawnscript does http://code.google.com/p/springtutorial ... awn.lua#47

Quick fix could be to delete this

Code: Select all

local _,_,_,ai,faction = Spring.GetTeamInfo(t)
local unitname = Spring.GetSideData(faction)
Spring.CreateUnit(unitname,sx,sy,sz,0,t)
and just specify the unit directly like this:
Spring.CreateUnit("tank",sx,sy,sz,0,t)
("tank" = put name of your unit)
(also remove the if unitname ... end)

Or just use this as a base, it should work: http://springrts.com/wiki/SpringTutorialGame
User avatar
The_Igishly_Co
Posts: 34
Joined: 10 Oct 2013, 01:56

Re: Games not loading models

Post by The_Igishly_Co »

knorke wrote:Was that the example download from http://springrts.com/wiki/The_Complete_ ... pring_Game ?
Those are a bit outdated, I will add warning to wiki.

Think problem is that the script tries to read team data of player but in testgames via spring.exe that is not set or something.
Basically what line 47 in this spawnscript does http://code.google.com/p/springtutorial ... awn.lua#47

Quick fix could be to delete this

Code: Select all

local _,_,_,ai,faction = Spring.GetTeamInfo(t)
local unitname = Spring.GetSideData(faction)
Spring.CreateUnit(unitname,sx,sy,sz,0,t)
and just specify the unit directly like this:
Spring.CreateUnit("tank",sx,sy,sz,0,t)
("tank" = put name of your unit)
(also remove the if unitname ... end)

Or just use this as a base, it should work: http://springrts.com/wiki/SpringTutorialGame
You mind just posting a .png of a working script? Or a not as out dated one? (Yes, I used the outdated tutorial base)
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Games not loading models

Post by smoth »

why a .png? we can post scripts here just fine.you are aware all spring projects can be viewed? Any sdz/sd7 can be opened in seven zip. If you are using the rapid system go on spring files and you will find the sdz/sd7 files there if you need examples :)
User avatar
FireStorm_
Posts: 666
Joined: 19 Aug 2009, 16:09

Re: Games not loading models

Post by FireStorm_ »

Code: Select all

function gadget:GetInfo()
  return {
    name      = "Super Simple Gadget to the rescue",
    desc      = "creates a neutral unit at centre of map",
    author    = "some person",
    date      = "2013",
    license   = "yes please",
    layer     = 8,
    enabled   = true
  }
end

if (not gadgetHandler:IsSyncedCode()) then
  return false
end

function gadget:GameStart()
	local gaiaID = Spring.GetPlayerTeamID()
	CreateUnit("builder1", (Game.mapSizeX/2), 0, Game.mapSizeX/2, "south", gaiaID)
	CreateUnit("tank1", (Game.mapSizeX/2)+100, 0, Game.mapSizeX/2, "south", gaiaID)
end
maybe this may help.
I think one can't have enough simple examples in the beginning.
I don't have any prior code experience before spring, so I still struggle with a lot of things that are probably obvious to others.

(note that this makes the units neutral, and un-commandable by player) I may have made a mistake but am a bit in a hurry :-)

side note:
(how could a calm period have killed a foundation stone like the Q&A... ?)
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Games not loading models

Post by Forboding Angel »

Why not just use game_spawn.lua??

https://code.google.com/p/evolutionrts/ ... _spawn.lua

^^ Spawns your initial unit and sets storage levels. Problem solved :-)
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Games not loading models

Post by knorke »

FireStorm_ :
local gaiaID = Spring.GetPlayerTeamID() Spring.GetGaiaTeamID
CreateUnit :arrow: Spring.CreateUnit

Btw the linked example spawn scripts are same as the one that is included with spring as an example in folder spring-94.1\base\springcontent.sdz\LuaGadgets\Gadgets\
User avatar
FireStorm_
Posts: 666
Joined: 19 Aug 2009, 16:09

Re: Games not loading models

Post by FireStorm_ »

Thanks knorke
(and a general sorry)
Next time i'll try to remember to take the time needed to help properly :-)
Post Reply

Return to “Game Development”