World of Banished

Conversations => General Discussion => Topic started by: MarkAnthony on July 01, 2019, 12:35:45 PM

Title: Mark's Spreadsheet Questions
Post by: MarkAnthony on July 01, 2019, 12:35:45 PM
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).

Title: Re: Mark's Spreadsheet Questions
Post by: MarkAnthony on July 01, 2019, 12:48:39 PM
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.                             
Title: Re: Mark's Spreadsheet Questions
Post by: kid1293 on July 01, 2019, 12:55:11 PM
Count the outmost tiles around the edge 7x7 = 24

5x4 =14
xxxxx
x     x
x     x
xxxxx
Title: Re: Mark's Spreadsheet Questions
Post by: MarkAnthony on July 01, 2019, 01:07:53 PM
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
Title: Re: Mark's Spreadsheet Questions
Post by: kid1293 on July 01, 2019, 01:10:02 PM
Column+column and row+row
Add all
Subtract 4 for corner doubles.
Title: Re: Mark's Spreadsheet Questions
Post by: MarkAnthony on July 01, 2019, 01:26:46 PM
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.
               
Title: Re: Mark's Spreadsheet Questions
Post by: kid1293 on July 01, 2019, 01:32:02 PM
Blackouts are tough. Backups are good :)

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

Math is like peanuts, good for entertainment :)
Title: Re: Mark's Spreadsheet Questions
Post by: kid1293 on July 01, 2019, 02:22:25 PM
I don't think Banished accesses the registry in mid-game. Only at startup (reading)
and at close down (writing)
Title: Re: Mark's Spreadsheet Questions
Post by: Nilla on July 01, 2019, 02:33:14 PM
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.
Title: Re: Mark's Spreadsheet Questions
Post by: MarkAnthony on July 01, 2019, 03:17:35 PM
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!   ???                
Title: Re: Mark's Spreadsheet Questions
Post by: MarkAnthony on July 01, 2019, 03:39:27 PM
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) (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
Title: Re: Mark's Spreadsheet Questions
Post by: moonbelf on July 01, 2019, 04:09:38 PM
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.
Title: Re: Mark's Spreadsheet Questions
Post by: MarkAnthony on July 01, 2019, 07:42:31 PM
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) (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!   ;)                
Title: Re: Mark's Spreadsheet Questions
Post by: MarkAnthony on July 01, 2019, 07:58:21 PM
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
Title: Re: Mark's Spreadsheet Questions
Post by: Nilla on July 02, 2019, 05:02:22 AM
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?
Title: Re: Mark's Spreadsheet Questions
Post by: MarkAnthony on July 02, 2019, 08:29:53 AM
Quote from: Nilla on July 02, 2019, 05:02:22 AM
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?
Good morning @Nilla , may I take your order please?  ROFL  :P   

Well for one thing, that chart I made will be for the spreadsheet's use on the back-end and will not be used or seen by people using my spreadsheet. I'm keeping it in the spreadsheet only because I don't think I will be able to figure out a formula to calculate those numbers. I also initially moved it into the spreadsheet just so I can post an easier to read chart of numbers to the forum, it was much better and easier for me to do than trying to use MS Word or a Notepad text file.

Anyways Nilla, whatcha' mean about how much space a grave needs within a graveyard?  We already know the footprint size of the graveyard and how many graves each one holds so I am not sure what more you mean.  Are you referring to how spaced out they appear next to one another?  If so... uhhm, why? For eye-candy reasons?

Like, "Oh Pastor, I really think you need a graveyard here at your Chapel, not toooo big, but not toooo small either!  One where we can walk around in easily and not like trip and fall over Bob who fell off the ladder while building the tavern! Oh! And let me tell you a bit about Bob! Between you and me Pastor, I think he was on the sauce while working! Uh huh, I do, I do!"

Haha -   :D   But is that what you meant? How densely packed they are? I would have no clue about how to go about figuring that out other than making each and every one one of those 183 graveyards and write a critique about them.  Of course then it actually would require the purposeful slaughter of thousands of Banies to fill them up. Do I understand your request exactly Ma'am?! This is what you want?   ;)

"The Evening Edition of Graveyard Digest anyone? Only thirty cents a copy. Come and get yours today!"  :P
               
Title: Re: Mark's Spreadsheet Questions
Post by: kid1293 on July 02, 2019, 08:39:17 AM
Add a subscription for me :)

What if I change the behaviour of cemeteries?
Max 32x32?
Title: Re: Mark's Spreadsheet Questions
Post by: MarkAnthony on July 02, 2019, 08:53:12 AM
Quote from: kid1293 on July 02, 2019, 08:39:17 AM
Add a subscription for me :)

What if I change the behaviour of cemeteries?
Max 32x32?
Good morning good Sir!

Hmmm.  A big shot modder like yourself asking me to include something into my spreadsheet that does not even exist in Banished vanilla? Does this mean that maybe you are contemplating on sharing your mod data with me at some point in the future?  I sure hope so and I look forward to support from modders.

I already mentioned it once, any mod data that is given to me to flesh out my spreadsheet to make it work better and provide more details will be hidden from public view by locking spreadsheet tabs down all the while hiding them from use and view too. And I always encrypt and lock my spreadsheets that I provide for download anyhow, just so no one comes in and takes my work and claims it as their own or messes around with it breaking things all over the place and then asking me to fix it for them.   >:(               

EDIT: And yes I know, that to do your 32x32 cemetery would most likely not even require me needing any internal data. I just thought I'd poke a bear and see what happens! (push my luck) 

Rofl  :P   
               
Title: Re: Mark's Spreadsheet Questions
Post by: kid1293 on July 02, 2019, 11:16:37 AM
This bear is friendly and only wants to rest. [scratch a little to the left] :)

I am not ready to share all that code. I have close to a hundred mods and in some,
there are many hundred files. I think I pass on this one.
Sorry if I disappoint you. I know you have a very tedious job ahead.

One word of caution. We are constantly changing the rules so a large spreadsheet
will quickly be outdated...   

Old info and updates will be my epitaph... (King Crimson 1969. (Couldn't resist)) :)

Be well. Regards
Title: Re: Mark's Spreadsheet Questions
Post by: irrelevant on July 02, 2019, 11:33:06 AM
If we make it we can all sit back and laugh,
but I fear tomorrow I'll be crying....
Title: Re: Mark's Spreadsheet Questions
Post by: kid1293 on July 02, 2019, 11:35:59 AM
Knowledge is a deadly friend
If no one sets the rules
The fate of all mankind I see
Is in the hands of fools

Hi @irrelevant ! Good to see old faces coming by.
Title: Re: Mark's Spreadsheet Questions
Post by: irrelevant on July 02, 2019, 12:11:08 PM
Ain't that the truth!

I have tickets to a King Crimson concert in DC in September; probably won't be many more.

I can only post from work; for some reason my computer at home doesn't like this site.

I restrained myself from posting at work for months, but that wasn't much fun!
Title: Re: Mark's Spreadsheet Questions
Post by: irrelevant on July 02, 2019, 01:51:49 PM
@MarkAnthony sorry about the hijack, please carry on! ;)
Title: Re: Mark's Spreadsheet Questions
Post by: brads3 on July 02, 2019, 03:08:47 PM
Quote from: kid1293 on July 02, 2019, 11:16:37 AM


One word of caution. We are constantly changing the rules so a large spreadsheet
will quickly be outdated...   



that is my theory as well. spreadsheets can be handy to new players for a vanilla game. adding 2 mods can change the numbers.flipping those 2 in the mod order can change them again.

      a long time agoi started work on a rough chart for the building construction costs. some used wood,some wood+stobe, W+S+iron or iron ore,etc.  i was goina put the barns in order based on the required materials and the storage capacity. not every mod is listed the same way. i started looking up the storage capacities for each barn this ment going thru pages and pages of threads to try and find them all.by the time i would have made just a rough chart,more mods would be created changing the chart. i gave up and went  back to playing the game.

     not all info is easy to find or available.there are charts here and there for the vanilla game.locatng them into 1 spot would be handy for the new players. beyond that i think MARK will beat his head on a wall.

       just to give you an example. chart the fields and outputs of each seed. mine are unique. they are not ALL RK seeds. even the RK crops do not grow  and produce as RK. they are affected by other mods.
Title: Re: Mark's Spreadsheet Questions
Post by: irrelevant on July 02, 2019, 05:24:43 PM
@MarkAnthony  I have to say, as someone who has been living and dying by spreadsheets 8 hours a day for the past 30 years, I admire the spirit with which you are tackling this project. I know I certainly don't have it in me to take on something like this, as I am now mostly looking forward to the day when I can leave my spreadsheets behind! Best wishes.
Title: Re: Mark's Spreadsheet Questions
Post by: MarkAnthony on July 02, 2019, 08:55:35 PM
Thanks @irrelevant ,

I haven't seen you around for a tiny bit, glad to see you back again. 
Title: Re: Mark's Spreadsheet Questions
Post by: Nilla on July 03, 2019, 02:00:43 AM
Quote from: irrelevant on July 02, 2019, 12:11:08 PM
I have tickets to a King Crimson concert in DC in September; probably won't be many more.
Have fun, I didn´t know they were still active. Must be severe old gentlemen by now! But if the Rolling Stones still plays why not?

Back to order:
QuoteLike, "Oh Pastor, I really think you need a graveyard here at your Chapel, not toooo big, but not toooo small either!  One where we can walk around in easily and not like trip and fall over Bob who fell off the ladder while building the tavern! Oh! And let me tell you a bit about Bob! Between you and me Pastor, I think he was on the sauce while working! Uh huh, I do, I do!"

No, I meant rather:
"Oh, Pastor we can´t afford to use valuable potato fields for something unproductive like graves"
"But Nilla, the people will be unhappy, if they have nowhere to bury their loved ones"
"Hm..... how many graves do you think we would need?"
"I would say, something like 20-30 for our town"
"If we build a graveyard 9*12 tiles large, there will be room for 25 graves. That means we need to sacrifice 4,32 tiles or 30 baskets potatoes for one grave. If we build it a little larger, say 9*13 tiles, there´s room for 30 graves and each grave will only cost us 27 baskets of potatoes. Let´s ask that new guy Mark Antony with his Magic Spreadsheets which size that graveyard should have, to lose as little potatoes as possible" 


You know, something like that was in my mind. ;)