Author Topic: Mansion Upgrade Project  (Read 5399 times)

Offline egomassive

  • NPC
  • **
  • Posts: 105
    • View Profile
    • egomassive.com
Re: Mansion Upgrade Project
« Reply #15 on: November 22, 2016, 09:00:20 AM »
I have been poring over the source, the documentation, the github, the forum... I cannot figure out why maps do or don't rotate. Overmap specials marked "rotate" : false still rotate! But mine only rotate if I mark them true, but while the whole mansion rotates the individual sections do not. If I add "rotate" : true to any of my overmap terrains they fail the validation check while other structures have it and pass.  I'm so frusterated. This is the specific error I get if anyone cares to shed some light on it:
Debug : Invalid terrain "mansion_c" in overmap special "Mansion_Road".
Function : void overmap_special::check() const
File : src/overmap.cpp
Line : 986


Sidenote: I discovered that the 2 floor motel is rooved with shrubs. I think I'll get into the gethub side of things by submitting a fix for it.

Offline acidia

  • NPC
  • **
  • Posts: 155
    • View Profile
Re: Mansion Upgrade Project
« Reply #16 on: November 22, 2016, 04:10:29 PM »
This is going to be a bit new but what you need to do to get a multi-tile building to rotate as a single unit is to add "_north" to the end of all of the entries in overmap_specials.json, but no where else.  This tells the game that the existing orientation of the map is north... I haven't tried it but something like the below may work...  but I've never used anything but _north to designate orientation.

Code: [Select]
{
        "type" : "overmap_special",
        "id" : "mansion_new",
        "overmaps" : [
            { "point":[0,0,0], "overmap": "mansion_new_corner_north"},
            { "point":[1,0,0], "overmap": "mansion_new_side_north"},
            { "point":[2,0,0], "overmap": "mansion_new_corner_east"},
            { "point":[0,1,0], "overmap": "mansion_new_side_west"},
            { "point":[1,1,0], "overmap": "mansion_new_center_north"},
            { "point":[2,1,0], "overmap": "mansion_new_side_east"},
            { "point":[0,2,0], "overmap": "mansion_new_corner_south"},
            { "point":[1,2,0], "overmap": "mansion_new_entrance_north", "connect":"road"},
            { "point":[2,2,0], "overmap": "mansion_new__corner_west"}
        ],
        "locations" : [ "wilderness" ],
        "city_distance" : [3, 5],
        "city_sizes" : [1, 12],
        "occurrences" : [75, 100],
        "rotate" : true
    }

Offline egomassive

  • NPC
  • **
  • Posts: 105
    • View Profile
    • egomassive.com
Re: Mansion Upgrade Project
« Reply #17 on: November 22, 2016, 06:30:19 PM »
Wow, I was so close! I saw this in the source code and went searching for examples with _east and then _south and came up empty. *sigh* Thank you so much acidia!

[edit]Update: Rotation is working great now (as long as the mansion doesn't rotate as a whole.) Each corner and t-section can rotate to the correct orientation. That was an extremely fast turnaround from concept to implementation. Now, I need to tie the z-levels together and finish adding in all the item and monsters.[/edit]
« Last Edit: November 22, 2016, 07:57:22 PM by egomassive »

Offline StopSignal

  • Survivor
  • ***
  • Posts: 3431
  • Never stop drawing!
    • View Profile
    • You can see my drawings here!
Re: Mansion Upgrade Project
« Reply #18 on: November 23, 2016, 04:08:40 AM »
Man, that's really good to hear. Keep it up! Can't wait to test it out!

Offline egomassive

  • NPC
  • **
  • Posts: 105
    • View Profile
    • egomassive.com
Re: Mansion Upgrade Project
« Reply #19 on: December 01, 2016, 04:43:17 AM »
I've added items to all 54 maps. It took 1341 lines of json just to declare my item groups, and my mansion blueprint file is now at 4387 lines. *wipes brow with back of hand*

To Do List:
  • add monsters
  • figure out some items that aren't working correctly
  • z-level linking and rotation issues dealt with
  • test, balance, repeat.

I'll push it to my github branch after I've knocked out a few of these points. I'll be wanting feedback on balance, and you'll probably be wanting to check it out.


Offline SpadeDraco

  • Survivor
  • ***
  • Posts: 304
    • View Profile
Re: Mansion Upgrade Project
« Reply #20 on: December 01, 2016, 04:46:00 AM »
I've added items to all 54 maps. It took 1341 lines of json just to declare my item groups, and my mansion blueprint file is now at 4387 lines. *wipes brow with back of hand*

To Do List:
  • add monsters
  • figure out some items that aren't working correctly
  • z-level linking and rotation issues dealt with
  • test, balance, repeat.

I'll push it to my github branch after I've knocked out a few of these points. I'll be wanting feedback on balance, and you'll probably be wanting to check it out.

Awesome!

Offline egomassive

  • NPC
  • **
  • Posts: 105
    • View Profile
    • egomassive.com
Re: Mansion Upgrade Project
« Reply #21 on: December 03, 2016, 02:27:47 PM »
I have a dilemma. One of the center maps of my mansions is an indoor basketball court. The problem is pavement, yellow pavement, and the backboards are all outdoor terrain. I could use the waxed floor and create new indoor terrain for the other 2 types I need, or I could replace the gym with something else. On one hand, I hesitate to add anything that will require updating every tileset. On the other hand, I like my gym and its little sauna. Feedback/ideas welcome.

Offline 123nick

  • NPC
  • **
  • Posts: 104
    • View Profile
Re: Mansion Upgrade Project
« Reply #22 on: December 03, 2016, 06:19:32 PM »
I have a dilemma. One of the center maps of my mansions is an indoor basketball court. The problem is pavement, yellow pavement, and the backboards are all outdoor terrain. I could use the waxed floor and create new indoor terrain for the other 2 types I need, or I could replace the gym with something else. On one hand, I hesitate to add anything that will require updating every tileset. On the other hand, I like my gym and its little sauna. Feedback/ideas welcome.


maybe you could look at what the dojo or gym does, and use that as a flooring instead? pavement indoors is a bit odd, maybe wood flooring would be better? like the ones seen in the dojo ?? i think.

Offline egomassive

  • NPC
  • **
  • Posts: 105
    • View Profile
    • egomassive.com
Re: Mansion Upgrade Project
« Reply #23 on: December 04, 2016, 02:00:20 AM »
maybe you could look at what the dojo or gym does, and use that as a flooring instead? pavement indoors is a bit odd, maybe wood flooring would be better? like the ones seen in the dojo ?? i think.
No luck there. The gyms all have regular floors. The boxing gym has a canvas boxing ring and the dojo has tatami mats. I never realized those floor coverings were both considered furniture. (I heard it rains inside the tents at the FEMA camps. If that's true then fixing it can be as simple as placing dirt floors beneath the canvas floors.) It was worth a look though, good thinking 123nick.

Edit: Now that codemime's Overmap Overhaul (Step 4) has been merged, rotation problems are history. I'm going with new terrain based on waxed floors for the basketball court. Once I get monsters to spawn I think I'll push it to my github branch for previewing. There will still be z-level linking issues, so it wont be ready to merge for some time. (By "z-level linking" I mean I need to get mapgen to pick a piece of the mansion at random, and have that piece be able to specify it's z-level neighbors. It's necessary for stairwells and balconies to match up.)
« Last Edit: December 05, 2016, 07:53:39 AM by egomassive »

Offline egomassive

  • NPC
  • **
  • Posts: 105
    • View Profile
    • egomassive.com
Re: Mansion Upgrade Project
« Reply #24 on: December 08, 2016, 01:30:48 PM »
I've created a test pack for this project.

Download CDDAMansionTestPack.zip 33KB

It's a little different from my ultimate goal. This will only produce 4 variations of the mansion to ensure z-levels are stacked properly. Please try it out and then criticize it without mercy give me helpful feedback here.

Offline Zhilkin

  • NPC
  • **
  • Posts: 210
    • View Profile
Re: Mansion Upgrade Project
« Reply #25 on: December 11, 2016, 11:33:31 AM »
Not bad.

Offline AdonaiJr

  • Zombie Food
  • *
  • Posts: 63
    • View Profile
Re: Mansion Upgrade Project
« Reply #26 on: December 12, 2016, 05:01:34 PM »
Hey! I'll download and test this later today. Thanks for your work!

Offline egomassive

  • NPC
  • **
  • Posts: 105
    • View Profile
    • egomassive.com
Re: Mansion Upgrade Project
« Reply #27 on: December 13, 2016, 11:43:29 PM »
So, feedback is trickling in slowly. I haven't run into any problems in my own testing. I'm likely to throw this up for a pull request soon. It's not the final form I'm going for, but it's still better than the old mansions as is. The chief reason is so this will get better exposure and people will make threads like, "mansions are effed up!" which I can read for angry feedback.

In the meantime I've been reading through the source, figuring out all the pieces I need to link z-levels. Progress is slow. Also, I've been working on the MShock32XottoPlus graphics.

Offline Nibelung44

  • NPC
  • **
  • Posts: 173
    • View Profile
Re: Mansion Upgrade Project
« Reply #28 on: December 14, 2016, 04:22:21 AM »
Ah sorry, I'll definitively test your mansion project for my next game! Or ... can I add the mod in my current game and have the new areas generated with your mansions? Yes I believe I can!! But I will hit again the 'can't place more than 72 specials' issue problem that I never really understood in a game with an infinite map...


As for you working on the MShock32XottoPlus graphic pack, that is awesome! Please keep me updated, this the one I'm using and it is simply the best around for me. I'm not much into the Chestholes style graphics (aka big baby heads)

Offline egomassive

  • NPC
  • **
  • Posts: 105
    • View Profile
    • egomassive.com
Re: Mansion Upgrade Project
« Reply #29 on: December 14, 2016, 01:17:28 PM »
Ah sorry, I'll definitively test your mansion project for my next game! Or ... can I add the mod in my current game and have the new areas generated with your mansions? Yes I believe I can!! But I will hit again the 'can't place more than 72 specials' issue problem that I never really understood in a game with an infinite map...
If you add this to your current game you should keep getting the old mansions until you enter a new region. There's no obvious way to tell if you're in a new region or not. Your world options also need the Tall Buildings mod enabled. Regions are something like 30 square kilometers, and the 72 special structure limit applies to each region. So, if you've started in one region and entered a second, then there will be 144 special structures in your world.