Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 44 45 [46] 47 48 ... 59

Author Topic: Fortbent: Homestuck mod (v3.1.0) (0.44.05)  (Read 181444 times)

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Fortbent: Homestuck mod (2014 v1.1.0) (0.40.15)
« Reply #675 on: November 18, 2014, 07:44:11 pm »

Hmm. I guess you can use this script to add experience manually whenever you think you deserve it.

Code: [Select]
local amount=... or 1
dfhack.run_script('classes/add-experience','-unit',df.global.world.units.active[0].id,'-amount',amount)

Copy that into a <something>.lua file in the hack/scripts folder and use that with an argument to add experience to your adventurer.

vjmdhzgr

  • Bay Watcher
  • Hehehe
    • View Profile
Re: Fortbent: Homestuck mod (2014 v1.1.0) (0.40.15)
« Reply #676 on: November 19, 2014, 12:15:07 am »

Hmm. I guess you can use this script to add experience manually whenever you think you deserve it.

Code: [Select]
local amount=... or 1
dfhack.run_script('classes/add-experience','-unit',df.global.world.units.active[0].id,'-amount',amount)

Copy that into a <something>.lua file in the hack/scripts folder and use that with an argument to add experience to your adventurer.
What? I got as far as copying the code into a .lua file in the hack/scripts folder and typing the name of the file into DFHack. What's the argument thing you're talking about?
Logged
Its a feature. Impregnating booze is a planned tech tree for dwarves and this is a sneak peek at it.
Unless you're past reproductive age. Then you're pretty much an extension of your kids' genitalia

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Fortbent: Homestuck mod (2014 v1.1.0) (0.40.15)
« Reply #677 on: November 19, 2014, 12:49:58 am »

Just after. "something 5" will add 5 experience. Typing it will also work and add only one, since I figured my instructions may have been too oblique (I was right).

vjmdhzgr

  • Bay Watcher
  • Hehehe
    • View Profile
Re: Fortbent: Homestuck mod (2014 v1.1.0) (0.40.15)
« Reply #678 on: November 19, 2014, 01:01:55 am »

Just after. "something 5" will add 5 experience. Typing it will also work and add only one, since I figured my instructions may have been too oblique (I was right).
I'm just getting
"...\Fortbent.Graphical\hack\lua\classes\establish-class.lua:6: attempt to index local 'unit' (a nil value)
stack traceback:
           ...\Fortbent.Graphical\hack\lua\classes\establish-class.lua:6: in function 'establishclass'
           ...rtbent.Graphical\hack\scripts/classes.add-experience.lua:65: in main chunk
           (...tail calls...)
           ...f fortress\Fortbent.Graphical\hack\scripts/something.lua:2: in main chunk
           (...tail calls...)"
Replicated to the best of my ability even with correct slash directions as far as I can tell. In case it matters I've tried using it while just on the standard adventure mode view, I've tried it when my character was selected with z, I've tried it while hovering over my character with the l key, and I've tried it while looking at the description of my character. I'm also pretty sure I followed the instructions correctly. I copied the exact code that is in that code:[select] thing and just that into a file called something.lua.
Logged
Its a feature. Impregnating booze is a planned tech tree for dwarves and this is a sneak peek at it.
Unless you're past reproductive age. Then you're pretty much an extension of your kids' genitalia

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Fortbent: Homestuck mod (2014 v1.1.0) (0.40.15)
« Reply #679 on: November 19, 2014, 01:29:35 am »

It doesn't matter where it is, it should work regardless. Oy.

You don't need to call it something.lua exactly, of course.

Anyway, holy crap I do not understand what he's doing at all there. For some reason there's straight-up establishclass(unit,classes) in that file even though "unit" is never actually defined.

Just a shot in the dark, but use this instead:

Code: [Select]
local amount=... or 1
unit=df.global.world.units.active[0]
dfhack.run_script('classes/add-experience','-unit',df.global.world.units.active[0].id,'-amount',amount)
« Last Edit: November 19, 2014, 01:31:37 am by Putnam »
Logged

vjmdhzgr

  • Bay Watcher
  • Hehehe
    • View Profile
Re: Fortbent: Homestuck mod (2014 v1.1.0) (0.40.15)
« Reply #680 on: November 19, 2014, 01:55:40 am »

I tried all the different selection techniques as before and it's still just giving the same error. So, based off of what you said the problem is that unit is never defined in the original scripts? Based off of that I tried adding that definition of unit to the add-experience script just at the beginning because I know very little about lua, and the something command stops getting errors, though it seems to have caused an error with claspect-assign.lua. Even though there's no errors shown it still doesn't seem to work as "something 10" several times for each selection technique I've tried before didn't give seem to do anything.
Logged
Its a feature. Impregnating booze is a planned tech tree for dwarves and this is a sneak peek at it.
Unless you're past reproductive age. Then you're pretty much an extension of your kids' genitalia

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Fortbent: Homestuck mod (2014 v1.1.0) (0.40.15)
« Reply #681 on: November 19, 2014, 02:05:08 am »

The selection techniques don't matter because nothing's being selected.

Anyway, I have absolutely no idea what's happening there. I didn't write the class script.

Sergarr

  • Bay Watcher
  • (9) airheaded baka (9)
    • View Profile
Re: Fortbent: Homestuck mod (2014 v1.1.0) (0.40.15)
« Reply #682 on: November 19, 2014, 03:11:01 am »

fortbent-master.zip weights exactly 666 KB

top kek
Logged
._.

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Fortbent: Homestuck mod (2014 v1.1.0) (0.40.15)
« Reply #683 on: November 19, 2014, 03:18:44 am »

I just managed ectobiology.

It comes with the ability for trolls in homosexual relationships to have babies.

Prepare your porkhollow.

EDIT: Results of homosexual couples havin' babies creates glitchy relations screens that don't tell you anything. Grooaaaan.

EDIT 2: Okay, just female homosexual couples. Male homosexual couples' babies have two fathers just fine.
« Last Edit: November 19, 2014, 03:39:59 am by Putnam »
Logged

cyberTripping

  • Bay Watcher
  • JPEG Artifactoid
    • View Profile
Re: Fortbent: Homestuck mod (2014 v1.1.0) (0.40.15)
« Reply #684 on: November 19, 2014, 07:16:38 am »

Prepare your unnecessarily long fort-wide shipping grids

Welcome to fucked
Logged
Everything's in the news today

Sergarr

  • Bay Watcher
  • (9) airheaded baka (9)
    • View Profile
Re: Fortbent: Homestuck mod (2014 v1.1.0) (0.40.15)
« Reply #685 on: November 19, 2014, 10:33:45 am »

I just managed ectobiology.

It comes with the ability for trolls in homosexual relationships to have babies.

Prepare your porkhollow.

EDIT: Results of homosexual couples havin' babies creates glitchy relations screens that don't tell you anything. Grooaaaan.

EDIT 2: Okay, just female homosexual couples. Male homosexual couples' babies have two fathers just fine.
What if you momentarily flip the gender of the fathers, do your evil-work and then return back?
Logged
._.

Graknorke

  • Bay Watcher
  • A bomb's a bad choice for close-range combat.
    • View Profile
Re: Fortbent: Homestuck mod (2014 v1.1.0) (0.40.15)
« Reply #686 on: November 19, 2014, 12:25:48 pm »

Prepare your unnecessarily long fort-wide shipping grids

Welcome to fucked
I am going to draw so many grids you have no idea.
Logged
Cultural status:
Depleted          ☐
Enriched          ☑

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Fortbent: Homestuck mod (2014 v1.1.0) (0.40.15)
« Reply #687 on: November 19, 2014, 03:08:09 pm »

I just managed ectobiology.

It comes with the ability for trolls in homosexual relationships to have babies.

Prepare your porkhollow.

EDIT: Results of homosexual couples havin' babies creates glitchy relations screens that don't tell you anything. Grooaaaan.

EDIT 2: Okay, just female homosexual couples. Male homosexual couples' babies have two fathers just fine.
What if you momentarily flip the gender of the fathers, do your evil-work and then return back?

That is the exact method of ectobiology. The problem is that two mothers causes problems.

Also:

Code: [Select]
local split = require('split')
local utils = require 'utils'
local establishclass = require('classes.establish-class')
local read_file = require('classes.read-file')
local checkclass = require('classes.requirements-class')
local checkspell = require('classes.requirements-spell')

function addexperience(unit,amount,classes)
 kill_id = unit
 if kill_id >=0 then
  exps = amount
  pers,status = dfhack.persistent.get(tostring(kill_id)..'_current_class')
  pers.ints[1] = pers.ints[1] + exps
  pers.ints[2] = pers.ints[2] + exps
  if pers.value ~= 'NONE' then
   cpers,status = dfhack.persistent.get(tostring(kill_id)..'_'..pers.value)
   clevel = cpers.ints[2]
   if clevel < classes[pers.value]['LEVELS'] then
    cexp = tonumber(split(classes[pers.value]['EXP'][clevel+1],']')[1])
    if pers.ints[2] > cexp then
     cpers.ints[2] = cpers.ints[2] + 1
      print('LEVEL UP!! '..pers.value..' LEVEL '..tostring(cpers.ints[2]))
      if classes[pers.value]['B_PHYS'] then
       for i,x in pairs(classes[pers.value]['B_PHYS']) do
        dfhack.run_script('unit/attribute-change',table.unpack({'-unit',tostring(kill_id),'-physical',i,'-fixed','\\'..tostring(tonumber(split(x[cpers.ints[2]+1],']')[1])-tonumber(split(x[cpers.ints[2]],']')[1]))}))
       end
      end
      if classes[pers.value]['B_MENT'] then
       for i,x in pairs(classes[pers.value]['B_MENT']) do
        dfhack.run_script('unit/attribute-change',table.unpack({'-unit',tostring(kill_id),'-mental',i,'-fixed','\\'..tostring(tonumber(split(x[cpers.ints[2]+1],']')[1])-tonumber(split(x[cpers.ints[2]],']')[1]))}))
       end
      end
      if classes[pers.value]['B_SKILL'] then
       for i,x in pairs(classes[pers.value]['B_SKILL']) do
        dfhack.run_script('unit/skill-change',table.unpack({'-unit',tostring(kill_id),'-skill',i,'-fixed','\\'..tostring(tonumber(split(x[cpers.ints[2]+1],']')[1])-tonumber(split(x[cpers.ints[2]],']')[1]))}))
       end
      end
      if classes[pers.value]['B_TRAIT'] then
       for i,x in pairs(classes[pers.value]['B_TRAIT']) do
        dfhack.run_script('unit/trait-change',table.unpack({'-unit',tostring(kill_id),'-trait',i,'-fixed','\\'..tostring(tonumber(split(x[cpers.ints[2]+1],']')[1])-tonumber(split(x[cpers.ints[2]],']')[1]))}))
       end
      end
      if cpers.ints[2] == classes[pers.value]['LEVELS'] then
   print('REACHED MAX LEVEL FOR CLASS '..pers.value)
   if classes[pers.value]['A_UPGRADE'] then dfhack.run_script('classes/change-class',table.unpack({'-unit',tostring(kill_id),'-class',classes[pers.value]['A_UPGRADE']})) end
  end
     end
    end
   dfhack.persistent.save({key=tostring(kill_id)..'_'..cpers.value,value=cpers.value,ints=cpers.ints})
  end
 end
end

file = dfhack.getDFPath().."/raw/objects/classes.txt"
classes = read_file(file)

validArgs = validArgs or utils.invert({
 'help',
 'unit',
 'amount',
})
local args = utils.processArgs({...}, validArgs)

establishclass(unit,classes)
unit=df.unit.find(args.unit)
addexperience(tonumber(args.unit),tonumber(args.amount),classes)

Replace the contents of hack/scripts/classes/add-experience.lua with that to fix the issues earlier.
« Last Edit: November 19, 2014, 03:14:16 pm by Putnam »
Logged

King Kravoka

  • Bay Watcher
  • I will eat you.
    • View Profile
Re: Fortbent: Homestuck mod (2014 v1.1.0) (0.40.15)
« Reply #688 on: November 19, 2014, 03:23:03 pm »

I demand you bring back the class/aspect feature!
Logged
Sure. Yes, you are the Silver Surfer to a very inept Galactus.

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Fortbent: Homestuck mod (2014 v1.1.0) (0.40.15)
« Reply #689 on: November 19, 2014, 05:17:59 pm »

I had to go over the shit I wrote beforehand when I remade it.

I emphasize shit. It was awful. Absolutely, completely awful. There were so many bugs, so many of them did nothing, so many were useless. It was unreliable, being based off of odd syndrome crap.

Not only that, but it was impossible to keep up. There were 144 of them, each individually made. I had to make 144 individual class/aspect comboes for that; there was little similarity between two classes in one aspect and even less between two aspects of a class. It was big, which is not a good thing for my basic sanity. It was basically either what you see here or no updates for Fortbent ever again.
Pages: 1 ... 44 45 [46] 47 48 ... 59