Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upFacility buildings 001 - warehouse #9146
Conversation
Aenye
changed the title
Adds a new warehouse building [CR]
Facility buildings - warehouse [CR][WIP]
Sep 20, 2014
This comment has been minimized.
This comment has been minimized.
|
I think you just add place_groups on crate's tile. |
This comment has been minimized.
This comment has been minimized.
|
Thanks ! Will look into it and complete the update. |
Aenye
changed the title
Facility buildings - warehouse [CR][WIP]
Facility buildings - warehouse
Sep 20, 2014
KA101
reviewed
Sep 20, 2014
| { "point": "terrain", "id": "t_dirt", "x": [ 0, 23 ], "y": 23, "repeat": [ 5, 8 ] } | ||
| ], | ||
| "place_groups": [ | ||
| { "vehicle": "rv", "x": 12, "y": 13, "rotation": 270, "chance": 50 }, |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Fixed the rv-flatbed - thanks for pointing this out ! PS: Pieced together a nice spreadsheet in excel that gives me 100% accuracy when designing the layouts and generates code auto-magically. Will share if anyone is interested. |
This comment has been minimized.
This comment has been minimized.
Please do. Tedium & fine-detail are the biggest reasons we don't have more large structures in the game. |
KA101
assigned
KA101
and unassigned
KA101
Sep 20, 2014
This comment has been minimized.
This comment has been minimized.
|
Gonna need some more support code in mapgen and/or overmap_specials. Sorry. |
This comment has been minimized.
This comment has been minimized.
|
Here's the spreadsheet: https://app.box.com/s/w7n58om43xt6g4nmt1ey I've set it for the standard 24 x 24 grid and use a few minor functions in excel to make it link all the symbols in each row into a single string, appending it with quotations and a comma (unless it's the last line). TBH I'm not sure what functionality is required of the spreadsheet (well, apart from the obvious) - I will greatly appreciate your input ! While I'm not much in terms of json/c#, excel/vba have been my domain for a long time... |
Aenye
added some commits
Sep 20, 2014
This comment has been minimized.
This comment has been minimized.
|
Added the necessary code in overmap_terrain and overmap_specials. Should be acceptable now. |
Aenye
changed the title
Facility buildings - warehouse
Facility buildings 001 - warehouse
Sep 20, 2014
Mshock777
reviewed
Sep 20, 2014
| { "point":[0,0,0], "overmap": "warehouse", "connect":"road"} | ||
| ], | ||
| "locations" : [ "by_hiway" ], "//":"what special locations does it spawn", | ||
| "city_distance" : [10, 100], "//":"how far from a city it should be", |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Good point - not too close, though - trucks don't like city centres and vice versa. |
This comment has been minimized.
This comment has been minimized.
|
OK, I'll push the current merge then come back around for this and the craters later. |
This comment has been minimized.
This comment has been minimized.
|
Thanks ! Is there anything more I can do to help with #9130 ? |
KA101
self-assigned this
Sep 21, 2014
This comment has been minimized.
This comment has been minimized.
|
Got it working. Thinking that the crates need a bit more, seeing as one would need to cut/demo one's way into the structure. One thing I want to make totally clear: I (and probably every one of my fellow mergers) have made piles of these sorts of mistakes throughout my career. JSON glitches happen. We'd appreciate it if you make sure it runs on your end before PRing, but it's not as though we've never merged something that broke things. (I know I've broken the build a few times.) |
KA101
reviewed
Sep 21, 2014
| "@": "f_trashcan" | ||
| }, | ||
| "place_specials": [ | ||
| { "type": "toilet", "x": 17, "y": 2 } |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Crates can be handled later; rotation not so much. I'm looking into that and if I can get it working, will merge. |
vache
reviewed
Sep 21, 2014
| "id" : "warehouse", | ||
| "overmaps" : | ||
| [ | ||
| { "point":[0,0,0], "overmap": "warehouse", "connect":"road"} |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
KA101
Sep 21, 2014
Contributor
Would have been nice to know several hours ago. Thanks just the same, vache. :-/
This comment has been minimized.
This comment has been minimized.
KA101
Sep 21, 2014
Contributor
Nope, that of itself won't do it, and changing the ID didn't either. I've been all night at this and wold really like to smash something right about now.
...
Someone write a recipe to convert pebbles to sand, once the sand-pickup thing gets fixed. That ought to do it.
KA101
removed their assignment
Sep 21, 2014
This comment has been minimized.
This comment has been minimized.
|
Trying to fix this (somehow) as well - tried to test this one as well, but had a bit of trouble - is there any "trick" to quickly generating a lot of them (well, beside raw json edition on the required amount on an overmap) on an overmap, to test the rotations ? |
This comment has been minimized.
This comment has been minimized.
|
Fixed the coordinates in the building map. As for getting in, smashing a window and opening the inner door gives you easy access. That said, will add some more stuff to the crates. |
This comment has been minimized.
This comment has been minimized.
|
Testing mapgen rotation? Afraid you need it to produce more in mapgen, so no, you'd need to increase the amount. (And 2, 4 seemed better anyway--a warehouse or two per overmap is realistic, compared to the amount of power substations, etc.) |
This comment has been minimized.
This comment has been minimized.
|
I've done some testing and can see how it should work - a line should be added in overmap_specials. json that should say: "rotate" : true, I did that, but this resulted in a debug message that the game can't find "warehouse" (testing has shown that this one is the same map name as what I enter in overmap_specials in this line: "overmaps" : Has me puzzled to no end - tried several configurations and it's wither no rotation or can't find the map. Update: Tested in on the grocery (duplicated grocery1.json to m_grocery.json, where the map name was changed to m_grocery instead of s_grocery). Added it in the overmap_terrain and overmap_specials: overmap_terrain.json addition: { overmap_specials.json addition: {
Result: m_grocery not found. This means the error is somewhere in the above contributions. Thing is, this time I've copied them from what already is in the files and changed only the names. Tried changing the names around and even went and changed all of the id/names/filenames to m_grocery (as you can see above). No effect. |
This comment has been minimized.
This comment has been minimized.
|
Now try changing "warehouse" to "warehouse_north". I didn't notice that you didn't have rotate set in the overmap terrain before. |
This comment has been minimized.
This comment has been minimized.
|
Ok, will push it in warehouse.json and in overmap_specials.json as map name. One moment. |
Aenye
added some commits
Sep 21, 2014
This comment has been minimized.
This comment has been minimized.
|
You should only need to set "warehouse_north" in the layout in the special definition. The game reads in the ID from the mapgen json, then attaches _north, _south, etc for the different variants. Unfortunately, overmap_special isn't smart enough right now to assume north, and it has to be specified. |
Aenye
added some commits
Sep 21, 2014
This comment has been minimized.
This comment has been minimized.
|
Done that - cloning the branch to test... Cloned. Tested and ...it works !!! Pic 'cause it happened: http://i58.tinypic.com/250mlad.jpg Thank you Vache ! |
This comment has been minimized.
This comment has been minimized.
|
Always nice to have support, isn't it? >_< |
This comment has been minimized.
This comment has been minimized.
|
Yeah, although I'd call it "having my behind pulled out of the fire" rather than just "support". ^^ Even though the code is relatively easy to understand, some things culd be deemed tutorial-worthy. ;-) That or me turning the "newbie factor" to eleven. |
This comment has been minimized.
This comment has been minimized.
|
Just nice to see that you got help when you needed it. >_< |
KA101
self-assigned this
Sep 21, 2014
This comment has been minimized.
This comment has been minimized.
|
I should take both of you out for a brew or ten to show my appreciation. ;-) |
Aenye commentedSep 20, 2014
Just a warehouse filled with a lot of crates and a possible flatbed truck in the middle. Added as a 1 x 1 overmap special with low-to-average frequency (0-2). Based on house_rv.json by John-Candlebury.
Question: Is it possible to set which item groups pop up in crates ?