World of Banished

Conversations => Suggestions and Mod Ideas => Topic started by: kid1293 on January 17, 2016, 03:15:04 AM

Title: Garden Shed
Post by: kid1293 on January 17, 2016, 03:15:04 AM
I'm new to 3D-modding and could use some thoughts on why my first test isn't working.
I was using Black Liquid's mini forester but I wanted a forester workplace in form of a garden shed so that it will fit in a town and it should be 1x1 small. I found a model and managed to get it into the game. IF I click on the building while it is being built I get the usual forester window and IF I keep it open until the building is ready it works. But...
If I close the window I can not open it again. The building is there and there is a forester working and I can remove the building the usual way. But the building just isn't clickable!

I have compared code and files with the apiary and I am totally at loss what to do.
Probably it's something with the mesh but I have to ask you people if anyone have seen this problem?

Title: Re: Garden Shed
Post by: RedKetchup on January 17, 2016, 03:25:34 AM
yeah 1x1 is very very bad specially for a building. what is your map createdplaced in your code ?


CreatePlacedDescription createplaced
{
PathBits _placeBits = Normal | Obstacle;

int _width = 1;
int _height = 1;
int _footprintRotation = 0;

PathBits _placeBitArray
[
Normal | Obstacle,
]
String _placeBitmap =
"0";

ComponentDescription _allowAndRemove = "Template/Clear.rsc";
}

MapDescription map
{
PathType _pathType = Immovable;
String _pathBitmap =
"#";

bool _addToOverhead = true;
Color _mapColor = 0xFF545454;
}

Title: Re: Garden Shed
Post by: kid1293 on January 17, 2016, 03:29:39 AM
Almost exact.

I have

   PathBits _placeBitArray
   [
      Normal | Obstacle,
      Normal | Obstacle | Fast | Faster,
   ]

taken from the apiary.
Title: Re: Garden Shed
Post by: RedKetchup on January 17, 2016, 03:37:57 AM
i whould say go for 2x1 ?


CreatePlacedDescription createplaced
{
PathBits _placeBits = Normal | Obstacle;

int _width = 1;
int _height = 2;
int _footprintRotation = 0;

PathBits _placeBitArray
[
Normal | Obstacle,
Normal | Obstacle | Fast | Faster,
]
String _placeBitmap =
"0
1";

ComponentDescription _allowAndRemove = "Template/Clear.rsc";
}

MapDescription map
{
PathType _pathType = Immovable;
String _pathBitmap =
"#
.";

bool _addToOverhead = true;
Color _mapColor = 0xFF545454;
}



try it that way to see doesnt work better
and also with an entrance, you would prevent to have path blocked by something else and crash the game
Title: Re: Garden Shed
Post by: kid1293 on January 17, 2016, 03:40:17 AM
Will do!

Are there specific problems with 1x1?
Title: Re: Garden Shed
Post by: RedKetchup on January 17, 2016, 03:41:05 AM
Quote from: kid1293 on January 17, 2016, 03:40:17 AM
Will do!

Are there specific problems with 1x1?

yeah specific proble with trying to target the building
Title: Re: Garden Shed
Post by: kid1293 on January 17, 2016, 03:44:25 AM
Sad.
I tried your suggestion. Didn't work.
Guess I'm stuck with 2x2 then. Will try that too.

Nope, did not work.
Title: Re: Garden Shed
Post by: RedKetchup on January 17, 2016, 03:50:37 AM
you are sure to have the right code ? isnt your graphic placed wrong ?

like if your 'mesh' graphic has wrong coors and appear somewhere else on the map ?

you are working with what 3dsmax ? or blender ?
Title: Re: Garden Shed
Post by: kid1293 on January 17, 2016, 03:55:30 AM
Blender.
And yes I have thought about coors and couldn't find any way to change it exept
'apply location' so it is all centered.
I know you can skip build01 and build02 so I have only mesh, points and build_001.
If you have a minute I can email the source...

Said and done..
Title: Re: Garden Shed
Post by: RedKetchup on January 17, 2016, 04:19:19 AM
ok


sorry i was gone in world of warcraft to check auction house :)
Title: Re: Garden Shed
Post by: kid1293 on January 17, 2016, 04:21:07 AM
Take it nice and slow. It's Sunday!
Title: Re: Garden Shed
Post by: RedKetchup on January 17, 2016, 04:43:18 AM
doesnt appear your graphic has something. and it is not something linked to not have a build01.

gonna check all you code, or i will replace your code with the real one and do modifications to it to meet your 1x1 requirement. problably something missing somewhere.
Title: Re: Garden Shed
Post by: kid1293 on January 17, 2016, 04:47:17 AM
You don't sleep?
Title: Re: Garden Shed
Post by: RedKetchup on January 17, 2016, 04:52:42 AM
just woke up at around 6:20 AM. is approaching 8AM. i am east cost of america.


i copied over all the forestlodge code and replaced lines to meet your links and ... it does the same thing LOL
cant target it ^^

whats wrong with this ?
Title: Re: Garden Shed
Post by: kid1293 on January 17, 2016, 05:01:58 AM
You said it could be the coordinates?
One thing that happened early was that a villager took the wood to build and ran off the map!
I thought it could be the shed is located somewhere else but after editing it didn't happen again.
I agree it's strange.
Title: Re: Garden Shed
Post by: RedKetchup on January 17, 2016, 05:07:33 AM
it is something finally with your graphic lol

i totally 'redit' it and it works normally

here the new .fbx if you want it.

Title: Re: Garden Shed
Post by: kid1293 on January 17, 2016, 05:20:55 AM
Thanks!
was it use_001?

'redit' is french?
Title: Re: Garden Shed
Post by: RedKetchup on January 17, 2016, 05:33:14 AM
use = the place where the worker stand / or use the building.

use_00x = place to stand to use and work at the building
build_00x = place to stand when the are building the building (lol strange english)
create_00x = place where the new resource need to appear when you create something


Quote from: kid1293 on January 17, 2016, 05:20:55 AM
'redit' is french?

sorry maybe a typo 'redid' = 'did' again a second time 're' + 'did'


just woke up so ... didnt got time to take my 2nd coffee
Title: Re: Garden Shed
Post by: RedKetchup on January 17, 2016, 05:38:03 AM
if you didnt have a 'use_001' in your pointlist in your .fbx... maybe was your problem lol
Title: Re: Garden Shed
Post by: kid1293 on January 17, 2016, 05:47:35 AM
Well, I can not praise you enough! I got what I wanted.
It is almost 3 in the afternoon this side of the Atlantic and I think I go for the coffee too!

To all who wonder what this was about, the source is coming.
Title: Re: Garden Shed
Post by: RedKetchup on January 17, 2016, 06:04:02 AM
btw i noticed your shed doesnt have a door lol. do you want one ? ^^
Title: Re: Garden Shed
Post by: RedKetchup on January 17, 2016, 06:14:59 AM
sent you by email gardenshed2.zip with a door and a build01 to go with
Title: Re: Garden Shed
Post by: kid1293 on January 17, 2016, 06:18:56 AM
Yes I want a door
and I want to fix the UV on the back side
I want the size to 80%
Title: Re: Garden Shed
Post by: RedKetchup on January 17, 2016, 06:21:16 AM
about the UV ... i dunno what it is so if you want the .max .... just say so.
Title: Re: Garden Shed
Post by: kid1293 on January 17, 2016, 06:31:42 AM
It's beautiful as it is.
I'll try at the size later, this is very much for me.
You did (in the morning) what I have tried several days!
...and I learned a lot too!
Title: Re: Garden Shed
Post by: RedKetchup on January 17, 2016, 06:47:17 AM
i am sorry, the beginging of playing with 3D is always very long and very painful.

it will go better with time :)
Title: Re: Garden Shed
Post by: kid1293 on January 17, 2016, 07:15:54 AM
Yes I like it.
But the size is wrong and when I try in Blender it does not do it right
when I compile the files it gives error-codes (searching for several .001.rsc files)
I have tried to scale on import in Blender and I tried to manually change everything
I have checked all code. (not that it's wrong) and nothing references .001.rsc files

Did you insert new planes that is part of 'mesh' ?

Blender seems to handle them as separate.
Title: Re: Garden Shed
Post by: RedKetchup on January 17, 2016, 01:06:23 PM
yes i did. but 3ds handle that perfectly.

want me to do it ? scale down of 80%

the box i did was 0,9 x 0,9 of a tile (per 1.6 high)

if your compiler search for a 001.rsc it is because 1 of the material was renamed by your blender to 001. the game toolkit doesnt search of texture, but search for the name of material (which is the name you want to manually give as you want and which can be totally different of the .png is)
Title: Re: Garden Shed
Post by: RedKetchup on January 17, 2016, 01:15:13 PM
80%
Title: Re: Garden Shed
Post by: RedKetchup on January 17, 2016, 01:33:18 PM
75%
Title: Re: Garden Shed
Post by: kid1293 on January 17, 2016, 03:06:36 PM
You have been good to me RK. I appreciate your effort and hope you didn't think that I forced you into this.
I was really stuck and now it's OK again.

To all who let us ramble along I thank you and here is the result:
75% of the original size (the original you can find in the thread)
Title: Re: Garden Shed
Post by: MightyCucumber on January 17, 2016, 04:58:45 PM
Nice idea! ;) Can't wait to download this, it'll look really nice in the middle of the town to make cottages behind the houses. Good job!
Title: Re: Garden Shed
Post by: RedKetchup on January 17, 2016, 05:53:42 PM
Quote from: kid1293 on January 17, 2016, 03:06:36 PM
You have been good to me RK. I appreciate your effort and hope you didn't think that I forced you into this.
I was really stuck and now it's OK again.


np :) i am always good with everyone ^^

;D


but did you offered the .pkm somewhere ?
Title: Re: Garden Shed
Post by: kid1293 on January 17, 2016, 10:51:25 PM
Just woke up. I've put the .pkm in the download section for all to enjoy.
Title: Re: Garden Shed
Post by: kid1293 on January 20, 2016, 05:14:35 AM
Oops!

This goes to show that I should quit when done.
Tried another model (tons of free models out there)
and built it as I had seen and learned.
(mesh, build01, build02, points, build_001, build_002, use_001)

Now my people take wood and stone and run of the map.
I double-triple-fourtimes checked the code and it's OK.

So now I wonder if I am trying to learn how to mod OR trying to
learn how to use Blender...
Title: Re: Garden Shed
Post by: RedKetchup on January 20, 2016, 07:35:06 AM
lol where they are going ?
Title: Re: Garden Shed
Post by: kid1293 on January 20, 2016, 02:53:48 PM
I really don't know where they are going.
Sometimes they just take the wood and stone and put it on the ground
where they stand. Sometime they leave the map (different directions)
it must depend on the mesh being faulty.

I don't care right know. I've downloaded the Blender manual (offline-version)
So I have my days staked out. Downloaded Sketchup too and find it very
interesting. So we will see, no?
Title: Re: Garden Shed
Post by: RedKetchup on January 20, 2016, 09:42:08 PM
bah when you are tired of it... .just send me it by email ^^
and i ll fix it whatever it had as problem ^^
Title: Re: Garden Shed
Post by: kid1293 on January 21, 2016, 07:57:28 PM
Seems like I got it! (not the flu...)

RK - your workspace in MAX defaults to inches.
Mathieuso's (Fountain mod) defaults to centimeter.
Blender has internal unit of meter.
Blender translate meshes on import and I can't say that I understand all
but I have found a way to edit meshes in Blender and export them
without people running away.

Do you people mind if I release Mathieuso's small wood house without
the chicken legs? I don't know how to contact him so I can not ask permission.
Title: Re: Garden Shed
Post by: RedKetchup on January 21, 2016, 09:28:29 PM
mine yeah not sure if in "inch".... but it is set in "generic"

about matieuso... he has a facebook. maybe search for it ?
Title: Re: Garden Shed
Post by: kid1293 on January 22, 2016, 01:13:59 AM
Found Mathieuso on a forum (he is admin so it probably means he's using it)
Left him a message. We'll see if he accepts.



Now about Blender. I haven't found shortcut to do all I do to fix a mesh.
I import, rescale, set everything to zero manually, apply everything,
move the different meshes to their old position, edit, apply if needed.
rescale (which will center everything around common center, not zero)
move everything as group back to zero, save, drink some coffee and
maybe do it all over again.

But people don't run away any more.
Title: Re: Garden Shed
Post by: RedKetchup on January 22, 2016, 11:24:22 AM
haha i know how you feel ^^  ;D ;D ;D