Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CR] Home Improvement Megastore #11869

Merged
merged 9 commits into from Apr 4, 2015

Conversation

Projects
None yet
9 participants
@PropaneSoup
Copy link
Contributor

commented Mar 31, 2015

From #11851, I've got the layout mostly finalized, but I haven't touched any items spawns yet. I'm making this public because I really can't do much testing of it right now. Upon loading a game it gives me a json error of bad mapgen terrain. I'm hoping someone here can point out the comma that I've stupidly been missing somewhere.

Other than that, thoughts on its layout? Suggestions?

@sparr

This comment has been minimized.

Copy link
Member

commented Mar 31, 2015

I tried to figure it out. As near I can tell, it's complaining that "t_wall_h" doesn't appear in termap, but it still complains even if I change that row of terrain to all t_pavement.

".......................|",
".................ccc...|",
".---.....r|r...........|",
".|CT.....r|r.....ccc...|",

This comment has been minimized.

Copy link
@BevapDin

BevapDin Mar 31, 2015

Contributor

There is no mapping defined for C, the game does not know what terrain to put there and terrain is mandatory.

This comment has been minimized.

Copy link
@sparr

sparr Mar 31, 2015

Member

is this the root cause of the failure? the json loading error complains about the line "------------------------" which appears in a later mapgen object.

This comment has been minimized.

Copy link
@PropaneSoup

PropaneSoup Mar 31, 2015

Author Contributor

I put in a t_floor for all my pieces of furniture. Probably was an issue, but not the one I was talking about.

This comment has been minimized.

Copy link
@BevapDin

BevapDin Mar 31, 2015

Contributor

Nope, there is no terrain mapping for the letter C, what mapping you defined for any other letter does not matter at all. Look at the terrain object below, it contains mappings for _ . , r - | + d W but not for C, and also not for ^, how is the game supposed to known what terrain those places should have? As I said before, the terrain must be specified for every square, furniture and the other stuff is optional, but you need a terrain everywhere.

@sparr The mapgen objects are loaded later (they need to know the other stuff for valid terrain etc. ids) and may be loaded in a different order. An error with that message is thrown when the terrain mapping contains a letter that is not mapped. But there is bug: the error is throw from the wrong json object and that makes the line wrong, but this only affects the display of the error.

This comment has been minimized.

Copy link
@sparr

sparr Mar 31, 2015

Member

Good to know, re the bug.

However, I think you're on the wrong track. Not having a terrain mapping for the letter C might be an error, but it's not the error that throws this specific exception.

            pjo = jo.get_object("terrain");
            for( const auto &key : pjo.get_member_names() ) {
                if( pjo.has_string( key ) ) {
                    const auto tmpval = pjo.get_string( key );
                    const auto iter = termap.find( tmpval );
                    if( iter == termap.end() ) {
                        jo.throw_error( "Invalid terrain", key );
                    }

it looks like the "Invalid terrain" error specifically means that there IS a defined terrain mapping for a letter, but that the mapped string doesn't exist in termap[]

This comment has been minimized.

Copy link
@BevapDin

BevapDin Mar 31, 2015

Contributor

Indeed, you are right. There is no t_door_clear_c terrain.

This comment has been minimized.

Copy link
@PropaneSoup

PropaneSoup Apr 1, 2015

Author Contributor

Hm, I think I'm missing something. I've assigned terrain for my furniture and replaced the t_door_clear_c and a vending machine that also didn't exist and it's still giving me this error. I've checked all of my terrain with terrain.json, and they're all there.

@sparr

This comment has been minimized.

Copy link
Member

commented Mar 31, 2015

So not everyone has to reproduce it...

    src/mapgen.cpp:1200 Bad JSON mapgen, discarding:
  line 1:1: Invalid terrain


^
{
            "rows": [
            "------------------------",
@drbig

This comment has been minimized.

Copy link
Member

commented Mar 31, 2015

@sparr @PropaneSoup have the same issue. And then a couple more lines like it. I'll await more commits then :)

Floor for furniture and remove door_clear_c
Still getting that error though
"t": "t_floor",
"^": "t_floor",
"&": "t_floor",
"$": "f_floor"

This comment has been minimized.

Copy link
@BevapDin

BevapDin Apr 1, 2015

Contributor

It's t_floor, not f

This comment has been minimized.

Copy link
@KA101

KA101 Apr 1, 2015

Contributor

And look at those tabs...

"locations" : [ "wilderness" ], "//":"what special locations does it spawn",
"city_distance" : [1, 10], "//":"how far from a city it should be",
"city_sizes" : [4, 20], "//":"what city sizes should it spawn in",
"occurrences" : [10, 20], "//":"how many per overmap",

This comment has been minimized.

Copy link
@vache

vache Apr 1, 2015

Contributor

This means there will be a minimum of 10 and max of 20 per overmap. That should probably be reduced to something like [1,5]

This comment has been minimized.

Copy link
@PropaneSoup

PropaneSoup Apr 1, 2015

Author Contributor

Oh yea, that's is just for testing purposes so I don't have to go hunting around overmaps for one.

This comment has been minimized.

Copy link
@vache

vache Apr 1, 2015

Contributor

I figured it was something along those lines, but I just wanted to make sure because we've had problems with specials with high minimum occurrences stepping on other specials in the past.

@vache

This comment has been minimized.

Copy link
Contributor

commented Apr 1, 2015

A couple things I've noticed, structures that have walls that butt right up to the edge will look pretty ugly if they are ever placed next to each other. It's not as big a problem with overmap specials as opposed to normal buildings because specials are placed with a certain density so the chances of two butting up against each other is low, but it's something to keep in mind, especially once mapgen gets worked out to allow specials inside cities.

These buildings usually have large semi-outdoor garden areas with chain link fences for landscaping and garden supplies. I don't know if it's possible to have a roofed in area with chain link fence walls, but that might be good to add. Also, a lot of buildings lack back areas with offices and loading bays and dumpsters and things like that.

@PropaneSoup

This comment has been minimized.

Copy link
Contributor Author

commented Apr 1, 2015

Thanks for the tips on building gen with walls. I'll keep that in mind. I agree with you on the backroom and loading bay areas too, so the building is now a 2x3, with the extra rooms in the back.

I don't know if it's possible to have a roofed in area with chain link fence walls

I had considered them, and this was my reason for not including them in the layout.

@sparr

This comment has been minimized.

Copy link
Member

commented Apr 1, 2015

Why does the chain link fence area need to be roofed? Make a chain link fence material yard and if you need roofed areas put in some 3-walled buildings inside?

@facepalm

This comment has been minimized.

Copy link
Contributor

commented Apr 1, 2015

Sort of unrelated question: is there a way to spawn these sorts of maps in-game?

I've considered doing some map work myself, but aside from standing back and admiring my ascii drawings I don't know of any way to test them directly.

@sparr

This comment has been minimized.

Copy link
Member

commented Apr 1, 2015

You can spawn singles of them via the debug menu. Go into keybinds and assign a key to debug, then hit debug and map editor and map gen. You can't do the spiffy multi-tile overmap special stuff exactly, but you can do 1/4 of this at a time.

@facepalm

This comment has been minimized.

Copy link
Contributor

commented Apr 1, 2015

Flippin' sweet! Thanks!

@KA101

This comment has been minimized.

Copy link
Contributor

commented Apr 2, 2015

Chain-fence walls & roofed tiles: you can't build 'em personally but so far as I know there's no reason you can't set the tiles to be roofed concrete floor (may need to make that terrain? not sure) or wev in the mapgen. If need be, include a few single-tile walls in the area as support columns.

IIRC collapses only happen when terrain gets destroyed, so I wouldn't expect the garden center roof to just collapse. :-/

@PropaneSoup

This comment has been minimized.

Copy link
Contributor Author

commented Apr 2, 2015

Added in the garden area, turns out chainlink fences already support roofs :P

All thats left now are the Monster Spawns and water in the toilets. How does the layout look? Spawns too low, too high?
I did throw in some "handyman" CBMs, as some rare spawns, thoughts on those? Any CBMs or tools that I missed?

@vache

This comment has been minimized.

Copy link
Contributor

commented Apr 2, 2015

I'm not sure how I feel about including CBMs there. At this point in the world, CBMs are supposed to be a top of the line thing only available to the richest people, the government, and large companies. The only way I would see including them would be if they were locked up very tight, sort of like the CBMs in labs where you have to open the reinforced glass tubes to get at them.

@sparr

This comment has been minimized.

Copy link
Member

commented Apr 2, 2015

IRL, Home Depot carries small pieces of electronics that cost thousands of dollars, in "simple" locked glass display cases. Infrared cameras come to mind.

@drbig

This comment has been minimized.

Copy link
Member

commented Apr 2, 2015

Including CBMs sounds to me like pushing it way overboard. The point
is still the raw materials. Little tools, less zombies, no CBMs - that's
how I see it.

@Zireael07

This comment has been minimized.

Copy link
Contributor

commented Apr 2, 2015

I'd remove the CBMs too. Another branch of the store chain could stock small pieces of electronics, let's make this one about building.

@drbig

This comment has been minimized.

Copy link
Member

commented Apr 2, 2015

@sparr That could be a thing to ponder later (when we get proper industrial zones, or at least building supply lots (as discussed in #11851)). Though CBMs would still be too much to put there imo.

@PropaneSoup

This comment has been minimized.

Copy link
Contributor Author

commented Apr 2, 2015

Ok, I thought CBMs were a little more in the populace, guess my lore is a little rusty. I'll take 'em out of the spawns.

Zombie spawns, water in toilets
And some final touches
@PropaneSoup

This comment has been minimized.

Copy link
Contributor Author

commented Apr 2, 2015

Ok, this should be good for review.

One thing I did notice is that I seem to have no control over the zombie spawn. Using the MALL_GROUP zombie group, composed mostly of regular zombies, I was getting hoards of smokers, tough zombies and shocker brutes. Perhaps I'm missing something?

@PropaneSoup PropaneSoup changed the title [WIP] Home Improvement Megastore [CR] Home Improvement Megastore Apr 2, 2015

@BevapDin

This comment has been minimized.

Copy link
Contributor

commented Apr 2, 2015

You should not repeat the definition of this monster group (all json definition are global, it does not matter which file they are declared in), it is already defined in data/json/mapgen/mall.json.

The definition there contains

"replace_monster_group" : true,
"new_monster_group_id" : "GROUP_ZOMBIE_MID",
"replacement_time" : 0

Replacement time 0 means it's replaces right after the first turn, the replacement group "GROUP_ZOMBIE_MID" is used instead, which makes the group definition pretty much useless. Either increase the replacement time (it's apparently in days) there, or use another monster group.

@PropaneSoup

This comment has been minimized.

Copy link
Contributor Author

commented Apr 2, 2015

Ahh, that explains it. Unless there are any objections, I think I'll increase that replacement time to probably 14.

@KA101 KA101 self-assigned this Apr 4, 2015

@KA101 KA101 merged commit 0b657c2 into CleverRaven:master Apr 4, 2015

1 check passed

default
Details

@PropaneSoup PropaneSoup deleted the PropaneSoup:hardware-superstore branch Apr 4, 2015

@qbradq

This comment has been minimized.

Copy link
Contributor

commented May 14, 2015

What happened to the larger shopping carts idea? That was the part I was most excited for :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.