The below is some code section I am looking at from the Xorn mod, but what I am interested in is how to get extra slots into a new class for any race.
The idea is a chronomancy class where the self is doubled, perhaps a chrono-solipsist variant, the self being overlapped with another self, which then causes two of each slot.
So, as you see below, I was able to add some slots and give them x,y coords, and the below code does load with two of each slot that I can equip items into, except it still doesn’t work to double the psionic focus slot.
So, how do I get extra slots like these into a class birth descriptor?
Why do a few of the slots have a text=“(position)”? Somehow some maneuverings would cause some slots to not show or the game not to load, but the below code loads for me with the extra slots.
Does just making these slots cause the game to work with the equipment put in them or is there something else?
Since this code is originally from a xorn, which has its own race image, I don’t know how to set it so from a class birth descriptor it would put these into any race, or what all the numbers in the doll settings mean in relation to this.
And I am not nearly pretending I am going to be able to learn code, but I thought if its just a matter of moving and adjusting some things and anyone wanted to fill in what I don’t know, it might be doable?
talents = {[ActorTalents.T_X_BURROW] = 1,},
copy = {
equipdoll = "xorn",
moddable_tile = "xorn",
moddable_tile_base = "base_xorn_01.png",
healing_factor = .5,
life_rating = 12,
poison_immune=1,
disease_immune=1,
unused_generics = 1,
default_wilderness = {"playerpop", "allied"},
starting_zone = "trollmire",
starting_quest = "start-allied",
starting_intro = "xorn",
fourarms = true,
},
random_escort_possibilities = { {"tier1.1", 1, 2}, {"tier1.2", 1, 2}, {"daikara", 1, 2}, {"old-forest", 1, 4}, {"dreadfell", 1, 8}, {"reknor", 1, 2}, },
body = {PSIONIC_FOCUS=2,FINGER=4,LITE=2,HEAD=2,NECK=2,TOOL=2,MAINHAND=2,OFFHAND=2,FEET=2,BODY=2,QUIVER=2,BELT=2,HANDS=2,CLOAK=2},
}
ActorInventory.equipdolls.xorn = { w=48, h=48, itemframe="ui/equipdoll/itemframe48.png", itemframe_sel="ui/equipdoll/itemframe-sel48.png", ix=3, iy=3, iw=42, ih=42, doll_x=116, doll_y=168+64, list={
PSIONIC_FOCUS = {{weight=1, x=20, y=48},{weight=16, x=90, y=48}},
MAINHAND = {{weight=2, x=20, y=120},{weight=17, x=90, y=120}},
OFFHAND = {{weight=3, x=20, y=192},{weight=18, x=90, y=192}},
BODY = {{weight=4, x=20, y=336},{weight=19, x=90, y=336}},
QUIVER = {{weight=5, x=20, y=264}, {weight=20, x=90, y=264}},
FINGER = {{weight=6, x=20, y=480}, {weight=7, x=90, y=480}, {weight=21, x=20, y=408}, {weight=22, x=90, y=408}},
LITE = {{weight=8, x=192, y=408}, {weight=23, x=192, y=336}},
TOOL = {{weight=9, x=264, y=408, text="bottom"}, {weight=24, x=336, y=408, text="bottom"}},
FEET = {{weight=10, x=264, y=336}, {weight=25, x=336, y=336}},
BELT = {{weight=11, x=192, y=264}, {weight=26, x=264, y=264}},
HANDS = {{weight=12, x=264, y=192}, {weight=27, x=192, y=192}},
CLOAK = {{weight=13, x=264, y=120}, {weight=28, x=192, y=120}},
NECK = {{weight=14, x=336, y=48, text="topright"}, {weight=29, x=336, y=120}},
HEAD = {{weight=15, x=192, y=48, text="topleft"}, {weight=30, x=264, y=48, text="topleft"}},
}}
getBirthDescriptor("world", "Maj'Eyal").descriptor_choices.race.Xorn = "allow"
getBirthDescriptor("world", "Infinite").descriptor_choices.race.Xorn = "allow"
getBirthDescriptor("world", "Arena").descriptor_choices.race.Xorn = "allow"
----
So, looking at the Chronomancer classes, I can start like, just as an example:
newBirthDescriptor{
type="subclass",
name="Double-Self",
locked = function() return profile.mod.allow_build.chronomancer_double-self end,
locked_desc = "I will always stand with myself.",
desc = {
"...",
},
power_source = {psionic=true, technique=true, arcane=true},
body = {PSIONIC_FOCUS=2,FINGER=4,LITE=2,HEAD=2,NECK=2,TOOL=2,MAINHAND=2,OFFHAND=2,FEET=2,BODY=2,QUIVER=2,BELT=2,HANDS=2,CLOAK=2},
}
But that stuff about the extra slots = ?
I Made More Slots But How To Put Into A Class?
Moderator: Moderator
Re: I Made More Slots But How To Put Into A Class?
Seems like the author made a boolean called fourarms. If you look, you'll see he set it to true. Chances are, you'll have to look somewhere else in the superload, overload, or data to find what the fourarms boolean actually does. There's a small chance it's somehow related to two Psionic slots, but I doubt it. Worth a check anyways.
A little bit of a starters guide written by yours truly here.
Re: I Made More Slots But How To Put Into A Class?
yeah, it doesn't do that.
ive tried various things which make it not load, since i have no clue what i'm doing.
looking at this:
name = "Telekinetic Grasp",
type = {"psionic/other", 1},
points = 1,
cooldown = 0,
psi = 0,
type_no_req = true,
no_unlearn_last = true,
no_npc_use = true,
filter = function(o) return (o.type == "weapon" or o.type == "gem") and o.subtype ~= "sling" end,
action = function(self, t)
local inven = self:getInven("INVEN")
local ret = self:talentDialog(self:showInventory("Telekinetically grasp which item?", inven, t.filter, function(o, item)
local pf = self:getInven("PSIONIC_FOCUS")
Looks like if I could find what its getting, maybe double it there? or make a grasp2 that gets a psionic_focus2.
i can make two slots but as soon as grasp is gotten, it removes one slot.
A doubled self would also double inscription slots too since its two bodies.
But I need to be able to get all the double into class, not race.
ive tried various things which make it not load, since i have no clue what i'm doing.
looking at this:
name = "Telekinetic Grasp",
type = {"psionic/other", 1},
points = 1,
cooldown = 0,
psi = 0,
type_no_req = true,
no_unlearn_last = true,
no_npc_use = true,
filter = function(o) return (o.type == "weapon" or o.type == "gem") and o.subtype ~= "sling" end,
action = function(self, t)
local inven = self:getInven("INVEN")
local ret = self:talentDialog(self:showInventory("Telekinetically grasp which item?", inven, t.filter, function(o, item)
local pf = self:getInven("PSIONIC_FOCUS")
Looks like if I could find what its getting, maybe double it there? or make a grasp2 that gets a psionic_focus2.
i can make two slots but as soon as grasp is gotten, it removes one slot.
A doubled self would also double inscription slots too since its two bodies.
But I need to be able to get all the double into class, not race.
Re: I Made More Slots But How To Put Into A Class?
The fourarms variable actually doesn't do much other than a quick and dirty superload to turn off weapon quickswitch because it deleted any extra slots.
EDIT:
Other than that, I have no advice in that you seem to have done everything right for the extra slots, your biggest problem with extra psionic wielded weapons is that the original psionic wielding talent only works for one, so you'd need to add an extra talent set up to add into that slot.
The other problem that I found is how fickle the slots code is, some of them work with multiple, others had issue. For example I couldn't set the xorn to have 4 main arms because it just wouldn't load them at all.
Code: Select all
local _M = loadPrevious(...)
local base_quickSwitchWeapons = _M.quickSwitchWeapons
function _M:quickSwitchWeapons()
if self.fourarms then return end
local retval
return retval
end
return _M
Other than that, I have no advice in that you seem to have done everything right for the extra slots, your biggest problem with extra psionic wielded weapons is that the original psionic wielding talent only works for one, so you'd need to add an extra talent set up to add into that slot.
The other problem that I found is how fickle the slots code is, some of them work with multiple, others had issue. For example I couldn't set the xorn to have 4 main arms because it just wouldn't load them at all.
Re: I Made More Slots But How To Put Into A Class?
i got rid of the idea of giving them any telekinetic grasps anyway, for various reasons of class and difficulty.
The Chrono_Xorn I am working on is a 4D xorn, dual-self in one. Instead of messing with dual wielding talents with many arms, what I did was set offhands to 0 and instead made all 8 hands main. it seemed to load them because I attacked a creature and the attack log showed 8 attacks, mostly misses but still.
It loads all main for me and can fill them, or seems to work.
Also, I incorporated the broilift code and that works for one mainhand (I switched the code from offhand to mainhand; it only had worked for one hand anyway)
---[edit: somehow i now got it on all hands by making it a passive talent; clicking on it seemed to only let 1.]
and this is good, so now its like using a temporal hand or whatever I called it to assist the hold and it allows one hand slot to single wield a dual wielder, which means two-handed talents could be used and the lack of off-hands can be ignored maybe, I haven't fully tested it but i was able to load it and 7 other weapons and fight, so that's a cool addition.
but i have a ways to go. there are some balancers intended for all these slots btw... if i can manage what i intend.
The Chrono_Xorn I am working on is a 4D xorn, dual-self in one. Instead of messing with dual wielding talents with many arms, what I did was set offhands to 0 and instead made all 8 hands main. it seemed to load them because I attacked a creature and the attack log showed 8 attacks, mostly misses but still.
It loads all main for me and can fill them, or seems to work.
Also, I incorporated the broilift code and that works for one mainhand (I switched the code from offhand to mainhand; it only had worked for one hand anyway)
---[edit: somehow i now got it on all hands by making it a passive talent; clicking on it seemed to only let 1.]
and this is good, so now its like using a temporal hand or whatever I called it to assist the hold and it allows one hand slot to single wield a dual wielder, which means two-handed talents could be used and the lack of off-hands can be ignored maybe, I haven't fully tested it but i was able to load it and 7 other weapons and fight, so that's a cool addition.
but i have a ways to go. there are some balancers intended for all these slots btw... if i can manage what i intend.