World of Banished

MODS Garage => Tips and Help => Topic started by: Maldrick on December 17, 2018, 01:58:32 AM

Title: Attendance UI
Post by: Maldrick on December 17, 2018, 01:58:32 AM
Mod I've been working on is based on a Chapel template.  I added a different profession to it and that knocked out the attendance reporting.  After some research, I learned this is a modkit limitation.  So I removed the attendance UI since it doesn't do anything now.

Before I finish this and post it, I wanted to ask...Does removing that UI affect anything functional with the mod?
Title: Re: Attendance UI
Post by: kid1293 on December 17, 2018, 02:24:12 AM
If you ask about the happiness I do know it is concerned with attendance.

Maybe, maybe there is an effect when you need consolation (someone dies or so and you lose a happiness star)
If you don't belong to a chapel/church I don't know if you get consolation.

Happiness 'spirit' is also a generic happiness boost, discussed by Nilla and Tom Sawyer. I think that works on any building.

Think about this for happiness, though
   bool _requireWorker = true;

Title: Re: Attendance UI
Post by: Maldrick on December 17, 2018, 02:45:57 AM
Thank you, kid.  I'm making a courthouse so I changed it to Safety happiness.  Left everything in place, I just removed the bar from the UI section because it stopped reporting when I changed workers from priest to a modded profession.

Couldn't figure out what was going on when I made that change, but I found an old post by shockpuppet saying that the attendance reporting was tied to professions and couldn't be modded.  Which would explain why the CC courthouse is staffed by a cleric, I guess.

But yeah, I just removed that element from the UI section, is all.  Will that affect anything else?
Title: Re: Attendance UI
Post by: kid1293 on December 17, 2018, 05:43:36 AM
As far as I know attendance is linked to cleric, doctor and teacher. You can try other combinations
but one of those three professions is needed.
Title: Re: Attendance UI
Post by: Maldrick on December 17, 2018, 09:00:17 AM
That seems to be the case.  I really just need the happiness for this, though, which is separate, no?

I thought about going a different direction and using a Well template or, possibly, a town hall, but couldn't figure out how to keep my work button and not cause other problems.  Attendance is the only one I could find that doesn't require the building to actually make something.  I could be missing something, though.
Title: Re: Attendance UI
Post by: kid1293 on December 17, 2018, 09:14:45 AM
One thing I did at first was using the smith and change the consumeproduce part.
It is a very clean setup with the smith, not much needed to make it work. Icons and strings.
Happiness is easy to add.
Title: Re: Attendance UI
Post by: Maldrick on December 17, 2018, 09:42:00 AM
To make sure I understand your suggestion correctly, you think I should use a Smith template, add happiness with a worker, and a radius?  I have built points and a use point.  Any problems compiling that without anything else?

I'll give it a look.  I did try using a createplace work element but it didn't compile, I assume, because I was missing things that go with it.  But I guess starting with a Smith template will have everything I need to work with.  I started to try it with a Tavern template but it was late and I wasn't up to the task of safely removing all of the extra UI stuff like spinners etc.

Have to ask, I assume there's no dummy work button?  I looked through the templates but didn't see anything that looked more suitable than attendance.  By "suitable," I mean something that I had the energy to deal with at 3 am. Lol

Thank you, kid.  I'll give it a look.  I'm also going to test what I have now and see if it works.  Which will be fun with safety...Testing the minimal happiness effect on my minimally useful mod. Lol
Title: Re: Attendance UI
Post by: Tom Sawyer on December 17, 2018, 10:02:56 AM
That's a nice idea to make a courthouse for happiness safety. Maybe even better than wells, since they already have a function.

I think, making it depending on a worker is difficult or not even possible. Attendance doesn't work (except of being actually a chapel) and gathering or producing something doesn't make sense here. But the work button has to be connected with any of these functions. I would probably just make it as a passive happiness building without worker and work button. Or to try to create any fake consumeproduce thingy.
Title: Re: Attendance UI
Post by: Maldrick on December 17, 2018, 10:36:21 AM
Thank you, Tom.  I thought so, too.  Part inspired by the courthouse in CC, partly by playing Kingdom Come Deliverance, mostly because I have always thought more civic buildings to go with chapels and town halls for town centers woukd be nice.  My first mod was houses and I learned the basics and f-variants with that.  With this one the goal was to learn some different things, practice modelling, of course, and stick to the vanilla theme to force me to have to learn to match things up, etc.  It's gone really well, I think.  I'm a lot more comfortable with everything than I was before, for sure, and I've needed to ask for help a few times but have learned a lot about the kit by just following things around and experimenting.

This has me in a bit of a conundrum, though.  I thought I was done yesterday lol and then hit this attendance issue.  Immediately thought "THATS why the CC courthouse is staffed with a cleric!" lol. Did some searching and saw an old post by shockpuppet saying, essentially, that.

I really want to keep a worker and the work button.  Just how I envisioned the mod and, being a learning experience more than anything, I'd really like to sort this out if I can.

I'm about to sit down and try some things. First, I'm going to test if what I have now is working. If the attendance doesn't work, that's okay, it's the happiness that matters.  If it's not I'll try kid's suggestion and try a Smith template.

If I go with a Smith, is there a way to safely remove all of the spinners and whatnot?  How should I approach faking a consumeproduce mechanism?
Title: Re: Attendance UI
Post by: kid1293 on December 17, 2018, 12:37:02 PM
Oh, I thought you wanted to produce something. Sorry!
If not try the well instead. It is passive with a 'well' section you have to remove.

...and it already has your happiness.
Title: Re: Attendance UI
Post by: Maldrick on December 17, 2018, 01:00:50 PM
@kid1293 Thanks, yeah, I looked at doing a well, but then what do I do for a work button?  I want a worker on this with a work button, basically.

Been attempting to test if the happiness is working with the chapel setup.  Having a hard time getting a good test with any happiness using debug.  The times I've actually watched happiness closely, like when we were having that lenghy discussion last winter, were all in actual games.  So I started an actual playthough. Ugh lol
Title: Re: Attendance UI
Post by: Maldrick on December 17, 2018, 01:07:18 PM
Attached is the pkm if you guys want to have a look at what I'm doing.

Also, @Tom Sawyer , it occurred to me that while this will be minimally useful for most play, it could have some effect if used with The North since you've got happiness reworked in that.  I can adjust the radii if you think it needs it to keep it in line with your stuff.  The courthouse is pretty much the same as the CC courthouse but I tuned the radius down to 85 from 100, and the other building is 50...slightly wider than a vanilla chapel.  350 attendance for the former and 200 for the latter, although that doesn't matter now, obviously.

It's pretty much how it will be, pending this fix, some readjusting to the roof tiles sizes, and I need to finalize my toolbar.

EDIT:  Attachment removed as this will be finished and posted ASAP.
Title: Re: Attendance UI
Post by: Tom Sawyer on December 17, 2018, 01:30:00 PM
You can just use the Norsemen (https://www.banishedventures.com/norseman/) to make it significant for testing. It doesn't need the North mod.
Title: Re: Attendance UI
Post by: Maldrick on December 17, 2018, 01:32:23 PM
Oh, awesome, I'll do that then.  Thank you.
Title: Re: Attendance UI
Post by: RedKetchup on December 17, 2018, 02:25:42 PM
i rememeber to have tested some attendance things in NMT2.04 ... like the library.... and i didnt succeeeded to start a very new attendance like if the game doesnt allow us to create that (like was with new flag) ... so maybe you can go further than me who stop on this 3 years ago
Title: Re: Attendance UI
Post by: Tom Sawyer on December 17, 2018, 02:48:29 PM
Just build the new courthouse to see how the Norsemen react on this. After calculating the first time they had 60% happiness as default. Then got a sauna for health, a marketplace for goods, a chapel with priest and the alehouse with booze. This made them happy up to 85% and still missing safety (no wells). Then I hired a bailiff and it jumped to 100%, disabled work in the courthouse -> back to 85 and enabled again -> 100%. So it works as intended. But not sure if they are really happy or just scared and following your law and order.. ;D

(http://www.banishedventures.com/images/courthouse-small.jpg) (http://www.banishedventures.com/images/courthouse.jpg)
Title: Re: Attendance UI
Post by: Maldrick on December 17, 2018, 03:39:12 PM
@Tom Sawyer Really appreciate you giving it a look.  And thanks for the suggestion to use Norsemen.  I just ran a test and it helped a lot.  I just built about 100 houses and populated them with debug.  Let it run and there was a pretty consistent fluxuation around 50%.  Placed a courthouse and it evened it out.  Backed up to where I started that and did the same but with wells.  Same thing.  Which is consistent with what I noticed when we were having that long discussion about happiness earlier in the year.  So I'm going to call this a win and press on, clean up some details and get this posted.  Thank you again for having a look at it.

What did you think about the radii?  I can adjust them if you think they need changing for use with your mod.  I don't think it will really make that much difference with play outside of that so happy to tweak it if you think they need to be.
Title: Re: Attendance UI
Post by: Tom Sawyer on December 17, 2018, 04:21:47 PM
I think the radii are good. In real life, people would also build only one courthouse for a whole city and its entire surroundings (the map). The only issue can be that the circle is hard to notice by players because out of screen. I would also like something about 60 tiles around the court and 30 for the office. The biggest radius of vanilla and what I have so far is 45.

What I noticed at the courthouse is that it's scaled very large, also compared to the office. Maybe to scale it down to a size where the wall texture is similar to the office, I guess about 20% smaller. And another small thing. The court can be built only once which is fine but no way to read the description again. I had this effect  when testing, while the office I could check also after I built it.. wondering, who the heck is Henry?^^
Title: Re: Attendance UI
Post by: Maldrick on December 17, 2018, 05:40:23 PM
That sounds fine. I went with the larger radius when there was attendance but now just being a radius that works.  The CC courthouse has a radius of 100 for 350 attendance and that seemed a little out of proportion to me.  Either a smaller radius or higher attendance, imo.  But that sounds good.

Yeah I noticed it looked big in the screen you posted.  I'm going to keep the size because it's intended to go with the vanilla buildings and if you compare it to the vanilla courthouse, chapel, and hospital it's in proportion to those.  I will do more of these as I get further along, though, and what I have in mind definitely won't be as big.  In the end, it's pretty much a chapel with the attendance UI removed and the happiness type changed. Kind of has me curious about trying it with other happiness types but will need to mull that over for down the road.

Henry?  He's the protagonist in Kingdom Come Deliverance and I was just having some fun with that.  There's a lot of interaction with the local bailiffs and was partial inspiration for the mod, so I made a little reference there.

Thanks again for your help. Excited to be getting to a point of completion with this.
Title: Re: Attendance UI
Post by: Tom Sawyer on December 18, 2018, 12:44:48 AM
Ahh, this guy. I know him only from a let's play but it was a Heinrich there.^^ Congratulations to your new mod!
Title: Re: Attendance UI
Post by: Maldrick on December 19, 2018, 10:41:15 AM
Much appreciated, Tom.  Thank you, again, for your help.