Page 1 of 1

[Request] Heretic Operative

Posted: Wed Mar 18, 2020 2:18 am
by Lord Blade


Version: Year One Patch

Looking for:

Resources (edit or infinite)
- Lore
- Gold
- Influence
- Rumors
- Fate

Infinite Actions
- You get a set number of actions per turn

Cult Status
- Keep cult power at 0 (basically at time passes the cult gains power and triggers bad effects, and eventually you just lose if it's strong enough)

Edit Operative Stats
- Skills (Arcane, Social, Physical) used for challenges
- Health
- Corruption (at 100 you lose the operative, most actions build this up)
- Tranquility (corruption is lowered by this value at the start of each turn)

Always win challenges
- Challenges are a 3 die roll against a base score of 10. Every relevant skill point you have above the target lowers the value by 1 (so if your skill is 2 vs 0, then you only need to roll an 8) and vice versa.

Re: [Request] Heretic Operative

Posted: Mon Mar 30, 2020 7:49 am
by Lord Blade
Anyone able to help?

Re: [Request] Heretic Operative

Posted: Wed Apr 01, 2020 5:47 am
by kantoboy69
Having problem accessing the instance in lua

Thus I just created a dll that will add resources and set max action points
Also added keypad 7 to increase selected character stats by 10 and set health to max health and corruption to 0


cult status reset to zero may have an effect to the story flow of the game
just set your stats higher when rolling dice instead of always win

Include sharp mono injector or you can use any mono injector


Re: [Request] Heretic Operative

Posted: Wed Apr 01, 2020 5:53 am
by kantoboy69
LUA script to set max action points

Code: Select all

function GetFields(namespace, className)
   local classId = mono_findClass(namespace, className)
   local struct = monoform_exportStructInternal(createStructure(''), classId,
      true --[[recursive]], false --[[not static]], {'some struct map thing'}, false --[[not global]])

   local fields = {}
   for i=0, struct.Count-1 do
      local e = struct.getElement(i)
      fields[e.name] = e.offset
   end
   return fields
end


function my_mono_invoke_method(domain, method, args)  --make it easier to call
  local c=mono_method_getClass(method)
  local instance = mono_class_findInstancesOfClassListOnly(domain,c)
  instance = instance[1]

  print(string.format("Invoking method: %s", method))

  local params = mono_method_get_parameters(method)
  if #args ~= #params.parameters then
    print('ERROR:my_mono_invoke_method : wrong length of args')
    return
  end

  local i
  local args_t={}
  for i=1, #params.parameters do
    args_t[i] = {}
    args_t[i].type = monoTypeToVartypeLookup[params.parameters[i].type]
	args_t[i].value = args[i]
  end

  if method==nil or method==0 then
    print('ERROR:my_mono_invoke_method : method==0')
	return
  end

  if instance==nil or instance==0 then
    print('ERROR:my_mono_invoke_method : instance==0')
	return
  end

  local r=mono_invoke_method(domain, method, instance, args_t)
  return r
end



local sAGamex = GetFields('CPrompt', 'AGame')
local sAPlayer = GetFields('CPrompt', 'APlayer') -- monoAA_GETMONOSTRUCT('APlayer')

-- Find instance of AGame
local tcAGame = mono_findClass('CPrompt', 'AGame')
local cAGame = mono_class_findInstancesOfClassListOnly('', tcAGame)
local iAGame = 0
for i=1, #cAGame do
  x = readInteger(readPointer(cAGame[i]+24)+16)
  if ( x == 18) then
    iAGame = cAGame[i]
    break
  end
end

  -- Set ActionPoints to Max
  maxaction = readInteger(readPointer(iAGame+sAGamex.CurrPlayer)+sAPlayer.MaxActions)
  writeInteger(readPointer(iAGame+sAGamex.CurrPlayer)+sAPlayer.ActionPoints, maxaction)

-- Refresh Display
local APlayerRefreshDisplay = mono_findMethod('CPrompt', 'APlayer', 'RefreshDisplay')
my_mono_invoke_method('',APlayerRefreshDisplay,{})