PDA

View Full Version : Adding multiple professions



Sulimo
November 19th, 2018, 02:11
Hello all,

I have been working on a module to add two professions into RMC, however, I am runing into a problem. I can add one profession just fine, but the second one does not show costs for the various skills.

Anyone done this before?

I am guessing that I could create one module file for each profession and that would work. I have the Paladin from RMC1 in a module I build for that a long time ago. The new module I build has two professions, the first one has costs, but the second one does not.

I based this on looking at the RMC Character Law module. I have missed something somewhere, though I am not sure what. If anyone has an idea, let me know.
(Not so) quick snippet of code:



<?xml version="1.0" encoding="iso-8859-1"?>
<root version="2.9" RMCVersion="1.4">
<library static="true">
<modname>
<name type="string">Mod Name</name>
<categoryname type="string">Mod Name</categoryname>
<entries>
<section-001>
<librarylink type="windowreference">
<class>referenceinlineindex</class>
<recordname>..</recordname>
</librarylink>
<name type="string">Professions</name>
<index>
<entry-000>
<name type="string">Profession 1</name>
<text type="formattedtext">
<p>Flavor text.</p>
<list>
<li>List of requirements for Profession 1</li>
</list>
<p>Level Bonuses:</p>
<list>
<li>Level Bonuses</li>
</list>
<linklist>
<link class="referencetable" recordname="reference.professions.profession1@modname">Profession 1</link>
</linklist>
</text>
</entry-000>
<entry-001>
<name type="string">Profession 2</name>
<text type="formattedtext">
<p>Flavor text.</p>
<list>
<li>List of requirements for Profession 2</li>
</list>
<p>Level Bonuses:</p>
<list>
<li>Level Bonuses</li>
</list>
<linklist>
<link class="referencetable" recordname="reference.professions.profession2@modname">Profession 2</link>
</linklist>
</text>
</entry-001>
</index>
</section-001>
</entries>
</modname>
</library>

<reference>
<professions>
<profession1>
<name type="string">Profession 1</name>
<realm type="string">Arms</realm>
<primerequisites>
<id-0001>
<stat type='string'>N/A</stat>
</id-0001>
<id-0002>
<stat type='string'>N/A</stat>
</id-0002>
</primerequisites>
<placement>
<size>
<width type="number">402</width>
<height type="number">198</height>
</size>
</placement>
<sizelimits>
<dynamic type="string">both</dynamic>
</sizelimits>
<resetmenuitem>
<position type="number">8</position>
<icon type="string">restorewindow</icon>
<label type="string">Reset to default size.</label>
</resetmenuitem>
<text type="formattedtext">
<p>Flavor text</p>
</text>
</profession1>
<profession2>
<name type="string">profession2</name>
<realm type="string">Essence</realm>
<primerequisites>
<id-0001>
<stat type='string'>Re</stat>
</id-0001>
<id-0002>
<stat type='string'>Me</stat>
</id-0002>
</primerequisites>
<placement>
<size>
<width type="number">402</width>
<height type="number">198</height>
</size>
</placement>
<sizelimits>
<dynamic type="string">both</dynamic>
</sizelimits>
<resetmenuitem>
<position type="number">8</position>
<icon type="string">restorewindow</icon>
<label type="string">Reset to default size.</label>
</resetmenuitem>
<text type="formattedtext">
<p>Flavor text</p>
</text>
</profession2>
</professions>

<skilllist>
<primaryskills>
<title type="string">Primary Skills</title>
<list>
<id-00001>
<locked type='number'>1</locked>
<fullname type='string'>Maneuvering in Soft Leather</fullname>
<name type='string'>Man. in Soft Leather</name>
<type type='number'>4</type>
<calc type='number'>2</calc>
<stats type='string'>St/Ag</stats>
<armorfactor type='number'>0</armorfactor>
<costs>
<profession1 type='string'>1/*</profession1>
<profession2 type='string'>9</profession2>
</costs>
</id-00001>
Other skills the same basic format, just differing costs.
</list>
</primaryskills>

<secondaryskills>
<title type="string">Secondary Skills</title>
<list>
<id-00001>
<locked type='number'>1</locked>
<fullname type='string'>Acrobatics</fullname>
<name type='string'>Acrobatics</name>
<type type='number'>1</type>
<calc type='number'>1</calc>
<stats type='string'>Ag/Qu</stats>
<armorfactor type='number'>1</armorfactor>
<costs>
<profession1 type='string'>2/6</profession1>
<profession2 type='string'>2/9</profession2>
</costs>
</id-00001>
Other skills the same basic format, just differing costs.
</list>
</secondaryskills>


<unskilledactions>
<footnote type="string">
These actions cannot be trained, but may be modified by stats, profession levels, special abilities, items, etc.
</footnote>
<list>
<id-00001>
<locked type='number'>1</locked>
<fullname type='string'>Base Casting Roll</fullname>
<name type='string'>Base Casting Roll</name>
<type type='number'>2</type>
<calc type='number'>2</calc>
<stats type='string'>In</stats>
<armorfactor type='number'>0</armorfactor>
<costs>
<profession1 type='string'>---</profession1>
<profession1 type='string'>---</profession1>
</costs>
</id-00001>
</list>
</unskilledactions>
</skilllist>

</reference>
</root>

Dakadin
November 20th, 2018, 01:37
Hi Sulimo,

I just tested by taking the XML code and putting it into a module. It worked fine so it is likely you are seeing a cache version. Here is a screenshot of my results:
25340

Try starting a new campaign and open it to verify.

Sulimo
November 20th, 2018, 14:14
Interesting. I am not getting that.

However, if I start from scratch, it does work. There is probably something somewhere I have wrong in some syntax or other.

I am basically recreating it from scratch now, and hopefully it will work.

Thanks

Dakadin
November 21st, 2018, 02:17
Instead of starting from scratch you should be able to just change the name of the module.

Sulimo
November 21st, 2018, 23:55
That's ok, it is not that big, and I can basically add sections from the original one and test it to make sure it works along the way.

Sulimo
November 22nd, 2018, 21:23
So this is curious, now I am having trouble with Profession 1.

As soon as I change the name of it at the following location, it no longer shows the cost for Man. in Soft Leather:

<reference>
<professions>
<profession1>
<name type="string">Profession 1</name>
Etc.

I had always thought this was just a basic text string and I could put anything in there(Tom, Harry, Foo, etc.), but apparently not. I just changed it to Test, and after that the cost for the skill is blank. That is the only change I made. The same thing happens when I change the text for Profession 2 to something else.

Dakadin
November 23rd, 2018, 16:51
It is just a basic string. I think you are encounter issues because you are loading it into FG then making a change. FG is remembering the old name. You can verify this by manually typing the original name in the Profession field. Try unloading the module and reloading it to see if it resolves the issue.

Sulimo
November 23rd, 2018, 17:37
Hmm, I would think that since I create a new campaign each time I update the file that would have the effect of clearing out previous information. I completely close and reopen FG every time I update it, and create a new campaign each time.

However, trying your suggestion of renaming it manually to Profession 1 in the character sheet worked, so that is interesting.

How do I clear out this 'cache', for lack of a better word, if I am already closing and reopening FG, and creating a new campaign each time?

Dakadin
November 25th, 2018, 06:35
If you are starting a new campaign each time then it isn't a caching issue.

My guess would be that the XML tags for the profession aren't matching the skill costs for the profession.

Sulimo
November 25th, 2018, 07:37
Well, I don't know what I did differently, but, it is working correctly now.

The strange thing is, when there was a problem just changing the Text from the name for Profession 1 to something else (like my example of Test previoulsy), would break it, but I could go back and forth between Profession 1 and Test to have it work or not depending what I had there. New campaign each time.

But it's all good now.

Thanks

Dakadin
November 27th, 2018, 08:20
That's great news.

strubbel
March 29th, 2020, 00:12
Sorry for reviving that old thread, but I used it as a source for copy paste, created a module adding professions and skills as well as skill cost and now have some questions.
- The type tag in the skills seems to be for grouping, is there a cheat sheet or should I try & error it?
- The calc tag seems to be claculation method, same question as above
- I can use the skilldev to import all my added skills in the charsheet and that seems fine, how is overwriting existing skills handled?
- Is adding the cost the same as adding the skills or do i have to add them separately someplace else if I add completely new ones?
- In the example above there is a library addition for the professions, how would i do this for my new skills?
- It seems my skills are also not added to the list of skills (neither primary nor secondary, I can just import all to a character, how would I add them to the regular lists?
- The professions I added are only partially visible in the charsheet pulldown list, it seems to add only one, (maybe the last one) , do I need to adjust the size?

Dakadin
March 29th, 2020, 01:06
Hi strubbel,

No worries about reviving an old thread.

Skill type:
1 = MM moving maneuvers
2 = SM static maneuvers
3 = OB offense bonus
4 = SP special

Calculation type:
1 = Std. standard progression
2 = Base basic progression (rank x 5)
3 = Hits hit points
4 = Man. manual calculation
5 = PP power points

Modifying existing skills will be tough right now because they are in Character Law. I am trying to make it so things like this can be modified but it will be a future release.

When adding skills you want to have the skills costs in the <costs> section with a separate entry for each profession. If you add new professions then you need to add them to each skill. All the costs are currently with the skills. I might be changing that when I work on the professions in the new version. I would like them to display the information like they do in the Rolemaster Companions so it is easy to see what they get. Until I get to that point, I won't know if it will need to change but I am trying not to break any modules (unfortunately I had to break the RM table modules) so I will have a workaround if I do change it.

Here's an example from a module I made:


<Section-04>
<librarylink type='windowreference'>
<class>referencetext</class>
<recordname>..</recordname>
</librarylink>
<name type='string'>Skill Category: Animal Skills</name>
<text type='formattedtext'>
<h>Animal Skills List</h>
<linklist>
<link class='skill' recordname='reference.skilllist.primaryskills.list .id-00019@Rolemaster Companions'>Ride</link>
<link class='skill' recordname='reference.skilllist.secondaryskills.li st.id-00007@Rolemaster Companions'>Animal Handling</link>
<link class='skill' recordname='reference.skilllist.secondaryskills.li st.id-00009@Rolemaster Companions'>Animal Training</link>
<link class='skill' recordname='reference.skilllist.secondaryskills.li st.id-00017@Rolemaster Companions'>Beast Mastery</link>
<link class='skill' recordname='reference.skilllist.secondaryskills.li st.id-00046@Rolemaster Companions'>Driving</link>
<link class='skill' recordname='reference.skilllist.secondaryskills.li st.id-00064@Rolemaster Companions'>Herding</link>
<link class='skill' recordname='reference.skilllist.secondaryskills.li st.id-00078@Rolemaster Companions'>Loading</link>
</linklist>
</text>
</Section-04>


To add your skills to the regular lists, you need to put them in reference.skilllists.primaryskills or reference.skilllists.secondaryskills in your XML file.

You shouldn't need to adjust the size. It will do it automatically but I think it will only show one of each tag so make sure you haven't duplicated any tags for your professions.

strubbel
March 29th, 2020, 10:58
Thanks a lot, will try this tonight (cest).
But for future reference, would there have been a place to look up these numbers for category and type?

Dakadin
March 29th, 2020, 18:33
They are actually comments in the ruleset code. I hope to get some of this documented though.

strubbel
March 29th, 2020, 23:26
Thanks again, I've got it working now.
The professions are in the pulldown. I am generating the XML via a VBA Script from an Excel table I used for my charachters so far. I had not looped through all parts properly.
The skill entries are categorized and typed now and I can add "all skills" via the skill development window or drag them from the module in the library.

Dakadin
March 29th, 2020, 23:47
Good job!