Author Topic: Profession List  (Read 2046 times)

0 Members and 1 Guest are viewing this topic.

Offline RedKetchup

  • Champion
  • Banished Expert
  • *****
  • Posts: 7471
Profession List
« 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 ?
> > > Support Mods Creation developments with Paypal Donations < < <
Click here to PayPal Donate.

Offline RedKetchup

  • Champion
  • Banished Expert
  • *****
  • Posts: 7471
Re: Profession List
« Reply #1 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
> > > Support Mods Creation developments with Paypal Donations < < <
Click here to PayPal Donate.

Offline Abandoned

  • Advisor
  • Banished Expert
  • *****
  • Posts: 1592
Re: Profession List
« Reply #2 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.

Offline RedKetchup

  • Champion
  • Banished Expert
  • *****
  • Posts: 7471
Re: Profession List
« Reply #3 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
> > > Support Mods Creation developments with Paypal Donations < < <
Click here to PayPal Donate.

Offline elemental

  • Trader
  • ****
  • Posts: 459
Re: Profession List
« Reply #4 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.  :)

Offline Discrepancy

  • Modders
  • Architect
  • *****
  • Posts: 575
Re: Profession List
« Reply #5 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.

Offline RedKetchup

  • Champion
  • Banished Expert
  • *****
  • Posts: 7471
Re: Profession List
« Reply #6 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. :(
> > > Support Mods Creation developments with Paypal Donations < < <
Click here to PayPal Donate.

Offline RedKetchup

  • Champion
  • Banished Expert
  • *****
  • Posts: 7471
Re: Profession List
« Reply #7 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 :(
> > > Support Mods Creation developments with Paypal Donations < < <
Click here to PayPal Donate.

Offline Discrepancy

  • Modders
  • Architect
  • *****
  • Posts: 575
Re: Profession List
« Reply #8 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.

Offline RedKetchup

  • Champion
  • Banished Expert
  • *****
  • Posts: 7471
Re: Profession List
« Reply #9 on: May 27, 2017, 07:51:22 AM »
there may be an answer in the townhall code.

oh ya maybe ?? fingers crossing
> > > Support Mods Creation developments with Paypal Donations < < <
Click here to PayPal Donate.

Offline brads3

  • Banished Expert
  • *****
  • Posts: 1493
Re: Profession List
« Reply #10 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.

Offline RedKetchup

  • Champion
  • Banished Expert
  • *****
  • Posts: 7471
Re: Profession List
« Reply #11 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 ^^
> > > Support Mods Creation developments with Paypal Donations < < <
Click here to PayPal Donate.

Offline brads3

  • Banished Expert
  • *****
  • Posts: 1493
Re: Profession List
« Reply #12 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.

Offline Paeng

  • Banished Expert
  • *****
  • Posts: 1283
Re: Profession List
« Reply #13 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...   ;)
Heads are round so thoughts can take a turn

Offline RedKetchup

  • Champion
  • Banished Expert
  • *****
  • Posts: 7471
Re: Profession List
« Reply #14 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.

> > > Support Mods Creation developments with Paypal Donations < < <
Click here to PayPal Donate.