News:

Welcome to World of Banished!

Main Menu

Mark's Spreadsheet Questions

Started by MarkAnthony, July 01, 2019, 12:35:45 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

MarkAnthony

Hi.

I've started my spreadsheet for Banished two days ago and I only work on it for a bit at a time because well... I want to PLAY too you know!   :D

At this point I am just entering in certain types of data about the game and I am already stumped about something.  I figured it would be best for me to just have one thread here where I can ask all the questions I may have to help me flesh out the spreadsheet.

I hope it's alright and that it won't annoy too many World of Banished forum readers. Thank you kindly and thank you in advance for any assistance you may offer.   :)

~MarkAnthony

EDITED TWO DAYS LATER:
I mentioned my intentions to build a spreadsheet for Banished in another thread topic somewhere and I said that it would be for Banished (Vanilla) only at first.  It's my hope that if any modders see my spreadsheet and like what they see and what I did with it that they will let me do the same for their mods too. By this in particular I mean, share any internal data they use in their mods.

Just of note, I will add things from other mods into my Banished spreadsheet anyhow such as RedKetchup's Editor Choice and the North as well but it would only include the information I would have discovered on my own by playing those mods. It just wouldn't be as detailed as it would be if I had their "hidden data" and "secret sauce" recipes!   :P

So once again, this spreadsheet I am making now and intend to share with everyone will initially be for Banished (Vanilla).

Sometimes it's the very people who no one imagines anything of
        who do the things no one can imagine.

MarkAnthony

#1
So my first question that has me stumped is figuring out the calculation that is used for the cost of bridges, tunnels, cemeteries, and pastures. I can forget about bridges and tunnels I suppose since that really depends on the map itself in regards to what size the bridges and tunnels will end up being.

But cemeteries and pastures are different, they have the same pre-determined sizes that are allowed - anywhere from 7x7 minimum to a 20x20 maximum build size. The building cost for cemeteries and pastures are the same: one piece of building material per unit of length.  The per unit of length is what confuses me, for example: a 7x7 costs 24 building materials and a 20x20 costs 76 building materials to make. 

So my question is: How specifically does a 7x7 = 24 units of length or a 20x20 = 76 units of length?

/stumped by the math

EDIT: First of all I forgot to sign off with a "Thanks" -- so Thanks!

Secondly, in relation to stone roads and it's cost of one piece of building material per unit of length, stone roads calculate out exactly as you'd expect it too - one building material for each tile of road. So yeah, cemeteries and pastures have stumped me because they aren't calculated exactly like roads - one tile = one building material.                             
Sometimes it's the very people who no one imagines anything of
        who do the things no one can imagine.

kid1293

Count the outmost tiles around the edge 7x7 = 24

5x4 =14
xxxxx
x     x
x     x
xxxxx

MarkAnthony

#3
I tried the true 7x7 = 49 but that didn't match.

Then I tried something almost like you did - I tried counting the rows and columns such as 7 columns across left to right plus 7 rows down from top to bottom, but that gave me 14.

Now to put that into a formula somehow.   Me and higher math (algebra ++ et al.) had a parting of ways many years ago and we haven't spoken to one another since!  I'm gonna have to see if she will even speak to me again!  Hehe   :P

I'm thinking: (X*2 ) + ((Y*2) -2) - something like that. Gotta test it.


Thanks @kid1293
Sometimes it's the very people who no one imagines anything of
        who do the things no one can imagine.

kid1293

Column+column and row+row
Add all
Subtract 4 for corner doubles.

MarkAnthony

#5
Quote from: kid1293 on July 01, 2019, 01:10:02 PM
Column+column and row+row
Add all
Subtract 4 for corner doubles.
Bahh! Just had a power outage when I was in the middle of editing that comment of mine. Seriously! When temperatures get so hot out here transformers and circuit breakers sure don't behave nicely with one another.

Anyhow, I started to change the formula to X*2 + (Y-2)*2 which I see is the same as yours.

I also lost about 20 minutes of data collection in an Untitled.txt file.  Geesh! 1980's Computer 101, always save files constantly!  :)

Hey speaking of power outages, I had the game open in the background while in the forums. Do you think I need to clear the registry for the game before relaunch? I'm referring to the mods section of registry. I've read that game crashes can affect the registry, and a power outage can be considered a game crash obviously.
               
Sometimes it's the very people who no one imagines anything of
        who do the things no one can imagine.

kid1293

Blackouts are tough. Backups are good :)

(2*x)+(2*y)-4 Yes, the same.

Math is like peanuts, good for entertainment :)

kid1293

I don't think Banished accesses the registry in mid-game. Only at startup (reading)
and at close down (writing)

Nilla

If you put together some information about graveyards, don´t forget the number of graves that had room at a cemetery. It´s not like crops where a tile is a tile. A 9*12 graveyard doesn´t have room for the same number of graves as a 12*9.

MarkAnthony

Thanks@Nilla

The 7 x 7 minimum to 20 x 20 maximum limits = 183 different size combinations allowed for cemeteries and pastures.  Getting the formula to calculate the cost of building each of these size combinations was easy enough though knowing 9x12 and 12x9 hold different values puts a kink into things.

I could try building a 7 x 7 cemetery and a 20 x 20 cemetery to find out the smallest and largest numbers of graves possible, and at the same time build a 9 x 12 cemetery and a 12 x 9 cemetery just to see what they provide and a couple other doubles like that to see if I can determine some sort of formula for it.

Though sadly, my disclaimer will not be able to say, "None of the Banies in this test were harmed." since hundreds will be at risk!   :(

But that is science & maths for you!   ???                
Sometimes it's the very people who no one imagines anything of
        who do the things no one can imagine.

MarkAnthony

#10
Don't worry folks!  I didn't really go through with it; I know I didn't need to.  I was just going for the shock value!   ??? :P

Don't be mad.   >:(

https://live.staticflickr.com/65535/48174413366_57d1dcb47b_z.jpg

No Banies were harmed, I promise.   ;)

And the values were:
7x7 = 9
20x20 = 144
9x12 = 25
12x9 = 32


EDIT: Maybe if I did a few other combo grave sizes I can somehow determine a correlation between the numbers, but I'm not so sure; I'm not "mathy" enough.  /shrug
Sometimes it's the very people who no one imagines anything of
        who do the things no one can imagine.

moonbelf

#11
ummm LOL! That's a lot of homelessness all in the cemeteries. I know you did it for your spreadsheet. Sorry, but it just made me laugh :P

Also, your image doesn't expand (enlarge) when you click on it. I don't resize any that I've posted and the forum software does the rest by creating a thumbnail that links to the larger image. At least I've never needed to do anything.

MarkAnthony

#12
Okay, I got the number of graves for all 183 possible graveyard sizes calculated.

The cells colored medium blue with bold black text are the sizes I built in game to get me some true values.  The entries in red text are me reverse engineering working the numbers backwards so that they all match up from left to right and from top to bottom.  EDIT: Lol, reverse engineering - listen to me!   :P

I could (and probably will) just leave this chart inside the spreadsheet and just reference it when needed but I'd much rather just figure out a formula for it that will spit out those numbers.

https://live.staticflickr.com/65535/48175895321_9e8a5c62be_c.jpg


EDIT: By the way, it's all @Nilla 's fault that I ended up doing this at all today, I mean the graves/graveyard calculations! I might have eventually got to this point somewhere down the line, like "Hey, would you like to know how many grave sites you'll be able to provide?" - but not this early in the spreadsheet development.  Hehe, that's alright though, one less thing to do later right and also one more feature added too!   ;)                
Sometimes it's the very people who no one imagines anything of
        who do the things no one can imagine.

MarkAnthony

Quote from: moonbelf on July 01, 2019, 04:09:38 PM
Also, your image doesn't expand (enlarge) when you click on it. I don't resize any that I've posted and the forum software does the rest by creating a thumbnail that links to the larger image. At least I've never needed to do anything.
I understand what you are saying @moonbelf but when you do it the way you do they just show the thumbnails in the comments. I wanted my images displayed. The issue with my way though is if I post too big a picture the comments window needs to be scrolled from left to right to view the image fully unless you have your browser window pretty large or even full screen - but that gives you a nicer image size when you click on it.

If I display a smaller image in the comments it looks nicer without the scrollbars and the forum software enlargens it for viewing but when you click on it you see a smaller image - like you mentioned.

I'm just trying to find the middle-ground here.  /shrug
Sometimes it's the very people who no one imagines anything of
        who do the things no one can imagine.

Nilla

All bad things; yes it´s my fault.  ;D

Should I annoy you even more?
What about another column in which you calculates how much space one grave needs for each size of the graveyard?