New obiect - question

The place to discuss all things Lugaru.
Post Reply
Zeno3939
Posts: 4
Joined: Mon Jul 30, 2012 12:40 pm

New obiect - question

Post by Zeno3939 » Sun Aug 12, 2012 9:22 am

Hi . I download the source code of lugaru and i want to add new object into game . I made a model and textures ( grassobject , snowobject and desertobject ) and when i open the folder with open source I said " W...T...F ? " . i found two "objects" files but i don't know what i have to do . it's possible to add new object ? please help :?

User avatar
rudel_ic
official Wolfire heckler
Posts: 2193
Joined: Sun Aug 28, 2005 11:19 pm
Location: Hamburg City
Contact:

Re: New obiect - question

Post by rudel_ic » Sun Aug 12, 2012 9:50 am

General modding resource thread:
viewtopic.php?f=7&t=6297

———

Your answer:
You can't easily add a new object to Lugaru. That would involve C++ programming.
You can however replace an existing object with yours.

Replacing objects works with ANY version of Lugaru, not just the opensource one.

I'll walk you through it:
1. You make a new 3D model with Blender (Make it look cool)
2. You add a UV map in Blender (The exporter needs it)
3. You convert all polygons to triangles (The game only displays triangles)
4. You export the model as a SOLID (call it awesome.solid) viewtopic.php?f=7&t=5620&start=0
5. You open a file browser
6. You navigate to Lugaru/Data/Meshes/
7. You rename Box.solid to Box.backup.solid (This is your backup of the original model)
8. You copy your awesome.solid to the folder
9. You rename awesome.solid in the folder to Box.solid
10. You start the game
11. You start Challenge 1
12. You go into map editing mode with Shift+M (Debug mode has to be on)
13. You increase size with Arrow Up to like 0.5 or something
14. You jump into the air, and in midair, you press M to add a box
15. It should be your new object! Yay!

You can do the same with weapons and stuff, although you might want to be more intricate with UV-mapping then, and also replace the textures for the weapon.

As for the opensource version, to do anything with it, you'd have to build it first. You need gcc installed, and you need cmake, or Xcode if you're on a Mac. Also, you need some libraries, others are part of the package. I won't walk you through it unless you specifically ask for it.

Don't play with the opensource version unless you know what you're doing.
Debug mode is only available if you have the full Lugaru version. Replacing models works well with the demo, but you can't place new stuff because you can't enter debug mode. The opensource version of Lugaru is the full version of the game, but you have to build it first, as I said.

Zeno3939
Posts: 4
Joined: Mon Jul 30, 2012 12:40 pm

Re: New obiect - question

Post by Zeno3939 » Sun Aug 12, 2012 10:38 am

rudel_ic wrote:You can however replace an existing object with yours.
yes i know that , but if i replace 6 objects , i need 6 orginal objects and i need 2 obiects more i have a problem :/

I know c++ a little bit but i cant understand this files od source :/
I try to change a texture of box ( from (biom)box to "(biom)booox" ) but i didn't find any declaration of textures of type :"bla bla = "texture.png";" ( it's so creative :D )

User avatar
rudel_ic
official Wolfire heckler
Posts: 2193
Joined: Sun Aug 28, 2005 11:19 pm
Location: Hamburg City
Contact:

Re: New obiect - question

Post by rudel_ic » Sun Aug 12, 2012 10:46 am

Zeno3939 wrote:
rudel_ic wrote:You can however replace an existing object with yours.
yes i know that , but if i replace 6 objects , i need 6 orginal objects and i need 2 obiects more i have a problem :/
Lugaru has 2 characters, 3 weapons and 10 immobile meshes (well, and some you can't trivially place in a map). So there's quite a lot of wiggle room, actually.
I know c++ a little bit but i cant understand this files od source :/
I try to change a texture of box ( from (biom)box to "(biom)booox" ) but i didn't find any declaration of textures of type :"bla bla = "texture.png";" ( it's so creative :D )
Odd is the right word, haha.
I would recommend not replacing texture filename string references; you're about to shoot yourself in the foot there. Rather, replace the texture content. Backup the texture original and replace it with a new one. Note that texture dimensions have to be power of 2.

Zeno3939
Posts: 4
Joined: Mon Jul 30, 2012 12:40 pm

Re: New obiect - question

Post by Zeno3939 » Sun Aug 12, 2012 12:54 pm

by the way , I edited quit.png , enter.png and options.png to blue .I start the game , click enter the game and epic fail <facepalm> . there is red font . There's no image of all the buttons in data folder . can i in some way edit this ?
Zeno3939 wrote: this files od source :/
"od" its my mistake xD
"od" - means "from" in polish xD I used wrong grammar xD but "odd" better describes this source :D

User avatar
rudel_ic
official Wolfire heckler
Posts: 2193
Joined: Sun Aug 28, 2005 11:19 pm
Location: Hamburg City
Contact:

Re: New obiect - question

Post by rudel_ic » Sun Aug 12, 2012 1:54 pm

Zeno3939 wrote:by the way , I edited quit.png , enter.png and options.png to blue .I start the game , click enter the game and epic fail <facepalm> . there is red font . There's no image of all the buttons in data folder . can i in some way edit this ?
I can just straight edit the PNGs. So I dunno. Search your HDD for Quit.png, edit them one by one for testing, start the game each time afterwards, and if it changes, you're editing the right one. That's all I got.

In Mac OS X, there might actually be duplicate PNGs with the same name in the .app package, so make sure you're editing the right one. It's weird and I don't know why that is so, but it's at least easy to deal with.

Look, duplicate files in the same folder with different sizes:
Image

Weirded me out a lot when I played with textures.

Post Reply