Ideas for making Galaxy 1 more interesting
Ideas for adding oomph to Lave.oxp
____________________________________________________________________________________________________________
There are currently (29th April 2022) 3 topics in this thread:
1) Diplomancy.OXP: how to grant Digebitian subjecthood (no "citizens" (ptoo, ptoo) in Feudal States)
2) Library.OXP: how to insert extra information pages in the P.A.D.
3) Commodities: how to change the legality of slaves/price of slaves for Digebiti
____________________________________________________________________________________________________________
re: Diplomancy
Creating citizenship for Digebiti
So from Phkb's RexebeCitizen.oxp (second version posted above) I created DigebitiSubject.oxp - but I keep on getting several hundred credits added to my bank account. What am I doing wrong?phkb wrote: ↑Fri Dec 10, 2021 1:34 amOK, here's a link to an OXZ that I've now tested and confirmed it works as intended: RexebeCitizen.oxz.
Code: Select all
"use strict";
this.name = "DigebitiSubject";
this.author = "phkb";
this.copyright = "2021 phkb";
this.description = "Makes sure player has subjecthood in Digebiti.";
this.licence = "CC BY-NC-SA 4.0";
this.startUp = function() {
if (worldScripts.DayDiplomacy_000_Engine) {
worldScripts.DayDiplomacy_000_Engine.$subscribe(this.name);
}
delete this.startUp;
}
this._startUp = function() {
let c = worldScripts.DayDiplomacy_060_Citizenships;
if (!c.$hasPlayerCitizenship(0, 96)) {
let s = System.infoForSystem(0, 96); // gal + id of Digebiti
let price = c.$getCitizenshipPrice(s);
// make sure we have enough credits to buy the subjecthood
player.credits += price;
c._buyCitizenship(0, 96);
player.consoleMessage("You have been awarded subjecthood in " + System.systemNameForID(96), 5);
}
}