When an NPC logs into the server, one of the first things they set up is their basic PTJ info. The first thing about it they set is which category or type of part-time job they are. Here's a list of the ones I've run across and example NPCs.
[spoiler="PTJ ID List"]0 = Personal (Tracey, Deian)
1 = Grocery (Glenis, Fraser, Wanst, Caitin)
2 = Church (Kristell, James, Shena, Castanea, Collen, Pencast, Endelyon)
3 = ?
4 = ?
5 = Healer (Manus, Agnes, Kousai, Atrata, Kirine, [s]Hitsugaya[/s] Heulfryn, Belita, Dilys)
6 = Bank (Keith)
7 = Blacksmith (Elen, Ferghus)
8 = General (Walter, Galvin, Granites, Zeder, Effie, Kelpie, Pierrick, Malcolm)
9 = Public Office (Eavan)
10 = Tailor (Simon, Ailionoa, Kusina, Lepus, [s]Clown Jailbait[/s] Brenda)
11 = Bookstore (Aeria)
12 = Weapon Shop (Nerys, Osla, Meles, Taunes, Nicca)
13 = Inn (Piaras)
14 = Personal (Sion)
16 = ??? (Nele)
17 = ??? (Del)
18 = Running? (Duncan International)
19 = ??? (Stewart)
20 = Babysitting? (Duncan KR)
21 = Secret (Trefor)
22 = Secret (Aodhan)
23 = Secret (Aranwen)
24 = Secret (Meven)
25 = Secret (Delen)
26 = Alchemist (Eabha)
27 = ??? (Hans)
28 = ??? (Lileas)
33 = Law (Corentin)
10001 = Martial Arts (Ranald)
10002 = Paladin (Craig)
11001 = Magic School (Lassar)[/spoiler]
- Job IDs
The next thing an NPC does after logging in is to register a series of part-time jobs. These are formatted like quests and pull from XML IDs in a global part-time job folder. For example when Kristell logs in, she registers quest IDs 502101, 502104, 502105, 502131, 502134, 502135, 502161, 502164, and 502165.
I don't see any sort of weighting or seeding that would make one job more likely than another in cases like this. It's probably just Mabi's RNG being... well, Mabi's RNG.
They also set something along the lines of a "max employee" attribute that might limit the number of players that can get a job from that NPC per day (assuming in-game day because it's the same sort of setup for changing shop colors), but I think this is straight-up ignored nowadays and has been for a long time... but they still set it of course.
- Getting The Job
When you talk to an NPC about PTJs, they calculate your history and success rate to determine which level of jobs to give you.
For Kristell if your success rate is above 90% and jobs completed is above 100, you get hard (grade 2). If success >70 and times >50, you get medium (grade 1). Else if your times is 1 or 0 you get one of two greetings depending on if this is your first job ever with her or not but your difficult is set to normal (grade 0) anyways.
However if your times completed and success rates are really messed up or corrupted or something (say, negative), you get set to grade 9999 and the NPC detects that grade later in the script and aborts giving you the job. 'Cause using proper errors is too much work for devcat or something.
Anyways within your given difficulty, the NPC uses the SelectArbeit() function to choose which part-time job. The NPC then actually gives you the job using the GiveArbeit() function. As usual, we don't have the source/definition for this function so we can't see if it's set to be swayed... but given that the arguments are literally just the player and the job, I'd say any bad RNG here is just Mabi being Mabi.
- Job Data
As mentioned before, PTJs are XML files and set up like quests. They state their ID, and then some basic info about themselves. For PTJs this includes things like the type of scroll they appear on-screen on, the difficulty (level), their category, start time, report time, and end time.
Then comes the list of objectives to be completed, in the same sort of way that quests do. Functions like gatheritem() are normally used, but other quest-like triggers such as cleardungeon() and giveitem() for item chains and stuff show up from time to time as well.
After that comes the rewards, and each PTJ/quest outlines which rewards show up for what type of completion. For example Kristell's first PTJ has the following.
[spoiler="Quest 502101 Rewards"] <result code="gainexp(1,200)" desc="" resultlevel="perfect" />
<result code="getitem(63016,4)" desc="" resultlevel="perfect" />
<result code="gainexp(1,100)" desc="" resultlevel="high" />
<result code="getitem(63016,2)" desc="" resultlevel="high" />
<result code="gainexp(1,40)" desc="" resultlevel="low" />
<result code="getitem(63016,1)" desc="" resultlevel="low" />[/spoiler]
- Secret Part-Time Jobs
These usually require a specific dan title and/or wearing specific gear and/or talking to them on a specific IRL day or the week at a specific time while thinking about pancakes or some other really specific combination of stuff to actually trigger.
- Aodhan's is commented out. To quote the NPC info dump thread, IF it was enabled then you would...
talk to him while wearing a Furious or Lightning-quick Defense Dan title after G7S2 on Tuesday(?) (day 2) from 5PM to 6PM. Otherwise he'd just respond as if you used an unknown keyword. The PTJ would use the Guards' Secret Part-Timer title, and would involve giving an item to Edern, then Elen, then Seumas, then back to Aodhan. 5.8K and 11K EXP reward.
- Trefor's is commented out as well. If the day of the week was 2 and it was between 1 and 2 PM and you were wearing the Master of Smash title with the Smash skill at rank 18 or above (Dan 3?) with the Lightning Quick secondary title, he'd give you the job. Talk to Tracey, get an item from Nerys (Full Ring Mail delivery item), then give that item to Trefor. 5.4K gold and 11.4K EXP reward.
- Aranwen's exists, and used to have more specific triggers but most of them were commented out, she needs The Lightning Quick title option on I guess now, and the wiki has the details of the job since it seems somebody actually found out about this one.
- Meven has one, like Aranwen it used to need more but now it just needs the Mysterious secondary optional addon upgrade expansion pack title. You go get an unidentified potion from Lassar and then give it to Stewart. 5.4K gold, 11.7K EXP.
- Delen's is in the same fashion, used to have more complex triggers but now only lists the Celebrity title option as a requirement. Talk to Bryce, give a special Bouquet PTJ delivery item to Ibbie. 5.9K gold, 11.8K EXP.
Note that these requirements may have changed or things might have been re-enabled! It's just we'd need people with a lot of Dan titles to test this stuff, and "lol who does that in NA?", etc.
- Extra Info
- All of the game's files use the word "arbeit" when referring to part-time jobs. This is apparently a German word for work/labor that was adopted into Asian cultures.
- With the way things are set up, NPCs could share generic PTJs, but it doesn't look like they do.