World of Banished

MODS Garage => Tips and Help => Topic started by: RedKetchup on May 25, 2017, 01:36:40 PM

Title: Profession List
Post by: RedKetchup on May 25, 2017, 01:36:40 PM
hey i have a question @Nilla  where is from this little profession list with just laborer and builders ?
Title: Re: Profession List
Post by: RedKetchup on May 26, 2017, 09:34:17 AM

@RedKetchup; the mini-profession menu is a part of CC.


thanks , gonna send a PM to @kralyerg  for that ... but a while i didnt see him saying anything... not sure if still around lately :P
Title: Re: Profession List
Post by: Abandoned on May 26, 2017, 04:11:03 PM
@RedKetchup Kralyerg's that mini profession menu is a available as a separate mod over on BanishedInfo site.
Title: Re: Profession List
Post by: RedKetchup on May 26, 2017, 06:14:24 PM
@RedKetchup Kralyerg's that mini profession menu is a available as a separate mod over on BanishedInfo site.

nan thats the code i wish to get :)

for sure i can find out , but it would take me some time. i would like to get a mini profession list but with a little more than just laborers/builders. i wish to have a couple more as important as those like farmers, foresters, hunters and gatherers. and let it on the screen without covering half of my screen :S
Title: Re: Profession List
Post by: elemental on May 26, 2017, 06:34:42 PM
@RedKetchup I am pretty sure Black Liquid said that what you want to do is impossible. If it was possible they would have done it already.

The mini list isn't a true list, it's just the first two lines of the normal profession list. At least that's how I remember it being explained. Ask Kral though. He'll know more about it than I do.  :)
Title: Re: Profession List
Post by: Discrepancy on May 27, 2017, 12:36:43 AM
@RedKetchup , it is quite simple.

I remember on the old CC website kralyerg said he just shortened a single column professions box without a scrollbar. The rest of the professions are there, they are just hidden/inaccessible.

You will need to create your own 'Template/UtilityProfessions.rsc' file, linked to your own 'Dialog/Profession.rsc' file.

the vanilla professions is a simple table UI, it will expand automatically unless you control it.
(RedKetchup, my sorce-code banished UI: professions mod in the lab. it doesn't have exactly what you are asking, but you can see how I did it)

@Nilla , sorry I am hijacking your thread now :)

first off change your Dialog/RKProfession.rsc file

In this file just alter the following code:
Code: [Select]
TableDescription professionTable
{
int _width = 2; // change this to 1 for a single column professions box
int _height = 1;
int _cellPad = 2;
int _topPad = 4;

TableItem _items
[
{ int _x = -1; int _y = -1; ElementDescription _element = "professionRow"; }
]
}

Now we want to control the height, and make sure it doesn't expand to show all the professions:

at the very top, change the GroupDescription content name to something else:
Code: [Select]
GroupDescription contentRK
{
ElementDescription _elements
[
"professionTable"
]
}

We want to contain the professions, so we put it in a container.
Now above the last code (at the very top), insert this:
Code: [Select]
ContainerDescription content
{
int _topPad = 2;
int _leftPad = 2;
int _bottomPad = 2;
int _rightPad = 2;

int _width = 220;
int _height = 200; // adjust this to the height of how many professions you want visible
int _scrollSpacing = 2;

bool _allowShrinkHeight = false;

ElementDescription _verticalScroll = "SharedElements.rsc:verticalScrollbar";  // remove/disable this, otherwise you will get the vertical scrollerbar
ElementDescription _content = "contentRK"; // change this to what you named the GroupDescription code.
}

you can also adjust the width of the individual profession names by adjusting the int _minWidth in the section 'LabelDescription labelProfession'

If you want to rearrange the professions, you will need to make your own copy of 'Game/Profession/Profession.rsc' and alter the int _sortPriority lower numbers being displayed first.
Title: Re: Profession List
Post by: RedKetchup on May 27, 2017, 07:10:10 AM
Thanks you !

it allow me to go further than i was getting but i still have a problem

(BTW i ve splited the profession subject from @Nilla ' s blog to not polulate it anymore ^^)


so ya , i still have a problem : if i decide to put like 6 columns (_width = 6) for example, the listing is still done up and down :(

1 4 7
2 5 8
3 6 9....

is there a way to make the table listing horizontally instead of vertically ?

1 2 3 4 5 6
7 8 9 10 11...

because if a mod add a new profession ... my listing get screwed totally. :(
Title: Re: Profession List
Post by: RedKetchup on May 27, 2017, 07:30:05 AM
like example, since i was able to customize it more with your tips @Discrepancy .. i decided to make it horizontally ontop of the screen (width=10) like screen 1
the ones i wanted was numbered 1 3 5 7 9 11 13 15 17 19
and those i didnt want to see 2 4 6 8 10 12 14 16 18 20 because the listing is vertical instead of horizontal...

was looking exactly i wanted.
but if i add +1 profession , even if it is stated 1250 in the order.... the listing go from 2 vertically at 3 vertically, and then all the listing is messed up because it becomes :
1 4 7 10 13 16
2 5 8 11 14 17
3 6 9 12 15 18
or even worst :( the game seems to try to make a good square of it and think if for the better looking square it needs to add a 4th row,,, it does it without my permission :(

and it is looking like screen 2 with just +1 profession from a mod :(
Title: Re: Profession List
Post by: Discrepancy on May 27, 2017, 07:41:39 AM
Yes I understand what you mean. I am having a look. It is about alternating the way the table is written in rows. there may be an answer in the townhall code I am trying a few things now.
Title: Re: Profession List
Post by: RedKetchup on May 27, 2017, 07:51:22 AM
there may be an answer in the townhall code.

oh ya maybe ?? fingers crossing
Title: Re: Profession List
Post by: brads3 on May 27, 2017, 10:10:50 AM
can i sneak in here like a mouse? i don't want to see you 2 be hijacked again.i agree with RED's listing order somewhat. i do think putting it across the top of the screen will be hard to read. can the window be made to just list just the vanilla professions?
      i play with CC. i don't want to see all the professions as my list is a mess.it starts by labor and builder, then goes alphabetical for a while then goes and adds modded professions in the middle of the alphabet. if you make sence of why or how, let me know. i set workers by adding each time i build a building.basically ignore the list. i probably have to open the game and check this but i will ask. do the mods that have a gatherer or hunter all use the same code? say NECORA's pine forest. would the pine hunter or gatherer be added to the profession list if it was designed to just add those original professions?
   i don't want to make any modder work hard to do it. i don't want to force all the modders to give me their info and codes either. the modders have more important stuff to do and thier own lives to live too. that would be crazy for me to suggest such a thing.
    i do wish the list read: labor,builder,farmer,herdsmen,hunter,fishermen,gatherer,forester,herbalist,medic/doctor,trader,and vendors at bottom. the forester and medic or herbalist can be thrown out too if need be to save space. but would like it to include all hunters and gatherers and herdsmen.
not sure it can be done since their is so many mods that produce food. i think RED's greenhouses use a different worker.
    in game play, i watch the labor count so i know when students graduate. if  i have lots of projects,i adjust the builders. after that i want to see food workers so i know i am keeping up on the reserves. i try to keep 1 food worker per every 5 bannies on food. sometimes i adjust the vendors to move goods to different areas. like in early winter to take food out of barns and then spring and summer to move textiles or production goods.
Title: Re: Profession List
Post by: RedKetchup on May 27, 2017, 10:39:17 AM
for the moment i didnt found out a way to call specific profession and pick up some , the ones i want, no matter how their are listed(order numbers)
in a up and down list , to get only vanilla , you need to put all vanilla ones first (in list order numbers) and then limit the bottom of the window so you dont see whats left cause like i said , i didnt found a way to stop the list.

presently, i changed a bit my project and make it incorporating a modified status window. a bigger RK Utility project. who knows, maybe by the time, me or @Discrepancy  will have found a parade ^^
Title: Re: Profession List
Post by: brads3 on May 27, 2017, 10:55:00 AM
OH I agree it might be a poject. the CC format doesn't make sence. you have seen my list. it is confusing. for now i use a smaller scrollable window.
Title: Re: Profession List
Post by: Paeng on May 27, 2017, 12:01:40 PM
the CC format doesn't make sence

Well, that's a bit too easy, imo... at least they give lots of options (hor, vert, 1-col, multi-col, scroll, no-scroll etc.)...

The problem is that whether it's horizontal or vertical, as long as you need to scroll it will always be hard to read (left to right-jump-left to right-jump... or top to bottom-jump-top to bottom-jump, and so on), the worse if it's not ordered alphabetically (save the proverbial Laborer and Builder).


i do wish the list read: labor,builder,farmer,herdsmen,hunter, <...snip...>

Hmmm... didn't we discuss that problem recently in a 6-page thread?   :D
http://worldofbanished.com/index.php?topic=1669.0

You wish this way, 10 others wish 10 different ways...   ;)
Title: Re: Profession List
Post by: RedKetchup on May 27, 2017, 12:19:21 PM
so like i said earlier ... i restarted my little project from beginning to include more things.....

it is starting to look pretty well :)

if i do this : it is because i am used to play games that have that setup usually ... homm II, III, IV... civIV, V, VI, and many other games ^^
i am used to look ontop to see if i have the mats required.... ^^

i dunno what i ll do with the custom though ... i would be to pack tighter, or dont put a minimum width at each bubble ^^ and i need to let some space for the status icons (frost, tool, homeless, disease ....)

bottom of that , i ll start to see if i can add the profession i want "manually" without calling a "table function" as it usually do.

Title: Re: Profession List
Post by: Paeng on May 27, 2017, 12:38:04 PM
i am used to look ontop to see if i have the mats required...

That's cool...   :)

How does it work with smaller resolutions (smaller than 1900 width)?
Title: Re: Profession List
Post by: RedKetchup on May 27, 2017, 12:43:03 PM
i am used to look ontop to see if i have the mats required...

That's cool...   :)

How does it work with smaller resolutions (smaller than 1900 width)?

i would need to customize those :P
the one i am doing for me is for a 1920x1080. i would need to know what other resolution people use :P 1280 ? 800x600 ? lol 480x320 ? double lol
of course, more little screen = less things
Title: Re: Profession List
Post by: Paeng on May 27, 2017, 01:41:04 PM
i would need to know what other resolution people use

I think the most common for laptops these days is 1366x768... or so  ;D


Quote
of course, more little screen = less things

Yeah... I could do without the stars and hearts, and temperature, date/season and stuff... but there you go again, ask 10 players and get 10 opinions... LOL   :D
Title: Re: Profession List
Post by: RedKetchup on May 27, 2017, 02:11:10 PM
I think the most common for laptops these days is 1366x768... or so  ;D

sincerely, i never heard this strange numbers resolution before today ^^ note surely my vcard can do that... i need to check :)
Title: Re: Profession List
Post by: Gatherer on May 27, 2017, 02:19:01 PM
1920x1080 represent!
Title: Re: Profession List
Post by: Paeng on May 27, 2017, 03:23:03 PM
sincerely, i never heard this strange numbers resolution before today

1366×768 dominates most of the mid-priced laptop world and also seems unique to the laptop world. It's to make room for wide-screen displays (almost 16:9)...

Quote
The basis for this otherwise odd seeming resolution is similar to that of other “wide” standards – the line scan (refresh) rate of the well-established “XGA” standard (1024×768 pixels, 4:3 aspect) was extended to give square pixels on the increasingly popular 16:9 widescreen display ratio without having to effect major signalling changes other than a faster pixel clock, or manufacturing changes other than extending panel width by one third. As 768 does not divide exactly into the “9” size, the aspect ratio is not quite 16:9 – this would require a horizontal width of 1365.33 pixels. However, at only 0.05%, the resulting error is insignificant.

<geek_off>  :D
Title: Re: Profession List
Post by: brads3 on May 27, 2017, 03:48:48 PM
PAENG, i came in here to this page quiet as a mouse on purpose. don't make me growl at you like a grizzley. that page you linked to i don't think i even DARED say 1 word in.that plane got hijacked and sent all the way to hell and back. i didn't even understand wtf happened to it by that point. hmmmm do you say 1 can make a mess like 10??
  yes i am glad for the options CC gave us. noo mine is not alphabtical or any other senceable way.i behave and go back to my corner now.
Title: Re: Profession List
Post by: RedKetchup on May 27, 2017, 03:58:04 PM
i making a pause on that for tonight... i am going nowhere. i didnt succeeded to call specific profession. i can get the laborer and its png showing, but it doesnt update its number.
Title: Re: Profession List
Post by: Paeng on May 27, 2017, 04:10:11 PM
don't make me growl at you like a grizzley.

Arghhh...  :D  No reason to, really...  ;)
Just trying to give Red some 'moral support'  ;D


Quote
hmmmm do you say 1 can make a mess like 10?

Hahaha, no... more like 10 making more mess than 1   :D
Title: Re: Profession List
Post by: brads3 on May 27, 2017, 04:15:25 PM
morals???? in here even??? hmmmm did you bump your head today?lol :D
Title: Re: Profession List
Post by: QueryEverything on May 27, 2017, 08:44:10 PM
the CC format doesn't make sence

Hmmm... didn't we discuss that problem recently in a 6-page thread?   :D
http://worldofbanished.com/index.php?topic=1669.0

You wish this way, 10 others wish 10 different ways...   ;)


OT:  (sorry Red, will get back to topic in a second, scroll past this if you want to :D )
Which is still a WIP, it's been a tough 2->3 weeks here (none of it for public speaking), and spreadsheets and I haven't worked together well during that time.
Back to normal routine later this week, so back to opening spreadsheets sometime then :D   thanks for the bump @Paeng  :D :D
{reasonably annoyed about your comments} @brads3, if you read that thread carefully, you will have seen that @Paeng was 100% correct, we discussed load order around a few times, and will address it more when the semi-final file has been updated, and released for the modders to work from.   
It wasn't a mess at all, I followed it along without any problems, and I was the one who had to work from it.

With Discrepancy's recent updates all the duplicated Professions have been removed from game, and have made an exit from the sheet too :D   (less colour coding :D that's a Win!!)

------ ~~~~~ ------
On topic:
Back to Red :) , @RedKetchup that top screen UI looks pretty damned cool! :D  I really like it.

My resolutions I use as a setting ingame is different to what comes out in the screenshot as I have the window slightly changed when the game is active, and of course, custom UI sizes ingame also will change how the UI looks as well.  I have custom sizing for that too.  Ooopsss ...
I'm not going to be difficult, or trying to be, I guess, I'm just putting it out there, that for some players "what size do you play in" is a 'piece of string' situation :)
 
I took another screenshot, edited it down to just the titles of the UI across the top, and got my reading that way :)  + to be sure, I also took a screenshot from my external screenshot program, externally of the game and they were within a pixel of each other - 1901  :)


My long winded point:  1920 seems to be the norm for me and is normally what gaming laptops have available (not all, but the ones we have here in our house), and the overrides I use in the UI menu will adapt it to my current screen size anyway.


Vote Plus One:  1920 width :)







Title: Re: Profession List
Post by: Discrepancy on May 28, 2017, 11:45:02 PM
back to the topic at hand. @RedKetchup !

I have found it... it was something so simple...

to make the professions display horizontal. I just increased the number (int _width) of the rows:

Code: [Select]
TableDescription professionTable
{
int _width = 99; // changed this from
int _height = 1;
int _cellPad = 2;
int _topPad = 4;

TableItem _items
[
{ int _x = -1; int _y = -1; ElementDescription _element = "professionRow"; }
]
}

Then adjust the height/width of the container we made earlier to suit.
Title: Re: Profession List
Post by: RedKetchup on May 29, 2017, 12:44:46 AM
back to the topic at hand. @RedKetchup !

I have found it... it was something so simple...

to make the professions display horizontal. I just increased the number (int _width) of the rows:

Code: [Select]
TableDescription professionTable
{
int _width = 99; // changed this from
int _height = 1;
int _cellPad = 2;
int _topPad = 4;

TableItem _items
[
{ int _x = -1; int _y = -1; ElementDescription _element = "professionRow"; }
]
}

Then adjust the height/width of the container we made earlier to suit.

euh... to put 99 i didnt try :P i always put like 10. i need to try that 99
Title: Re: Profession List
Post by: RedKetchup on May 29, 2017, 01:36:53 AM
   int _width = 99; // changed this from


wooooot !!! It work PERFECT !!!!!

i have the 10 i want ! (got to change a couple of profession order to get rid of the herbalist ^^ but works WONDERFUL !!!!


THANKS YOU SO MUCH !
i would never thought about the 99 myself ! i've been stuck at 10 LOL

 :-*  Thanks you ! @Discrepancy   :-*


-----------

Now i need to get back to the other one and try to find what i did the other night at the end... i totally broke the RK ALL Utility lol
Title: Re: Profession List
Post by: RedKetchup on May 29, 2017, 03:21:58 AM
YOUHOU !!!!  ;D

Look at that ! Look at THAT !!!!  :D  ;D  :D
Title: Re: Profession List
Post by: QueryEverything on May 29, 2017, 06:19:43 AM
Oh man, that's just :)
Holy fudge buckets Batgirl!  :D  Just so much winning here!! :D
@RedKetchup that looks impressive.
Great team work everyone!!
Title: Re: Profession List
Post by: Paeng on May 29, 2017, 07:26:01 AM
Love it!   :)


* So where is the order page for our personalized custom status bar?   :D
Title: Re: Profession List
Post by: RedKetchup on May 29, 2017, 10:44:01 AM
* So where is the order page for our personalized custom status bar?   :D

haha what will you want to have ?
Title: Re: Profession List
Post by: Paeng on May 29, 2017, 12:14:19 PM
haha what will you want to have ?

Ohhh... by chance I just so happened to play around with your idea today  :D

Here is what I came up with (attached)...  :-[

* couldn't resist to put in some more "hard" options...   LOL
Title: Re: Profession List
Post by: RedKetchup on May 29, 2017, 01:27:12 PM
* couldn't resist to put in some more "hard" options...   LOL

lol i see ^^
will check that after 4X NMT Canals 3.1 released
Title: Re: Profession List
Post by: Abandoned on May 29, 2017, 02:09:37 PM
oh my gosh @RedKetchup that is absolutely fantastic  :)  :)  :)


edit, looking again at paeng status bar, I would think the top 5 should be logs, firewood, food, tools , clothes on the first line.
Title: Re: Profession List
Post by: Paeng on May 29, 2017, 03:16:06 PM
I would think the top 5 should be logs, firewood, food, tools , clothes on the first line.

Well, I guess everyone would have different priorities for this... and different space options, too.   ;)


Red, no worry, don't make it high priority... whenever you feel like fiddling and experimenting with some weird code   ;)
Title: Re: Profession List
Post by: RedKetchup on May 29, 2017, 03:27:18 PM
Red, no worry, don't make it high priority... whenever you feel like fiddling and experimenting with some weird code   ;)

yeah thats a weird domain ! anything in that part can lead you to a crash when you trying to add something or change a number....
it is not like a model where you need to change something in the texture or boxes/shapes.


and whats about : families and homes numbers ?

NumberDescription numberFamily : "numberStat" { }
NumberDescription numberHomes : "numberStat" { }

 ;D


Title: Re: Profession List
Post by: QueryEverything on May 29, 2017, 04:03:00 PM
@RedKetchup & @Discrepancy ( @Necora , @kid1293 , @embx61 , @Tom Sawyer , & @Bartender ) (tagged you all in case someone may have an idea, if Red & Disc do not.  :)

--  Is there anyway to show in the Event log the change in season / month? 
----  And, if so - is there a way to attach a sound to it?

--  Is there a way for it to have it's own UI? Mini window to move around?

A way to change/add a notification for the change in season/month - that has a trigger, warning, etc for ease of use - so taking the  Early Spring / Early Summer - (I have a mod that changes it all to the Southern Hemisphere details), and having them flash in the event bar (at the least). 
I know that the part of the code can be accessed (I assume - maybe wrongly), due to the mod I mentioned, but, how can 1 harness the power?

Or - going along the lines of this new awesome code feast (and @Paeng that's a rocking idea too), perhaps even have a small window -just- for the season/month & temperature UI.  That way I (& others who want it) can move just that information around as well. 

Season / Month / Temperature / Year in its own UI, event list & sound (all, or some of the ideas anyway ;) )


& @RedKetchup I like that home / families stat too ;) 
Could you take the "Status" section from the TH and make it into it's own little UI ?!?


** the attachments are 'proof of concept only' and not everyone has to have pink, I needed a colour that stood out and hadn't been used before :D
Title: Re: Profession List
Post by: Paeng on May 30, 2017, 06:08:44 AM
and whats about : families and homes numbers ?

NumberDescription numberFamily : "numberStat" { }
NumberDescription numberHomes : "numberStat" { }

Yeah, that would be cool, too... in "my" stat bar, those two could just replace the hearts and stars, which I find rather useless... families and homes are much more useful info   :)


EDIT

Maybe like this...  :)