Improved script injection method |
Sun, 16 November 2014 06:30 |
Artofeel
Messages: 195 Registered: August 2013 Location: Russia
|
Senior Member |
|
|
This method allows you to make changes to the script without relaunching the game
Setup:
use Catspaw's GFWL emu
Put DLC folder to Fable 3 game directory
create folders: data\scripts\MyMod
create text files MyScript01.lua and MyScript02.lua inside "data\scripts\MyMod" directory
open dir.manifest (inside "data" directory) with notepad and add:
scripts\MyMod\MyScript01.lua
scripts\MyMod\MyScript02.lua
MyScript01.lua is executed once per 60 frames (one second on 60fps rendering)
MyScript02.lua is executed only when screen is fading
now make little test
start game
alt+tab
write in MyScript01.lua
Debug.SetUseFreeCamera(true)
alt+tab to game
now you can fly around
then alt+tab to notepad and replace TRUE to FALSE
Debug.SetUseFreeCamera(false)
alt+tab to game, camera should go back to normal :)
For modders:
I used DEMO001 quest code, so if you used it too, you need to replaced it
[Updated on: Wed, 25 March 2015 05:06] Report message to a moderator
|
|
|
Re: Improved script injection method |
Thu, 24 September 2015 14:03 |
TheGeniusSavant
Messages: 68 Registered: September 2015
|
Member |
|
|
I've written a nifty little script into myScript02
Toggle spoiler
while ((Inventory.GetNumberOfItemsOfType(GetLocalHero(), 'ObjectInventoryPotionHealth')) < 100)
do
Inventory.AddItemOfType(GetLocalHero(), 'ObjectInventoryPotionHealth')
end
while ((Inventory.GetNumberOfItemsOfType(GetLocalHero(), 'ObjectInventoryPotionSlowTime')) < 100)
do
Inventory.AddItemOfType(GetLocalHero(), 'ObjectInventoryPotionSlowTime')
end
while ((Inventory.GetNumberOfItemsOfType(GetLocalHero(), 'ObjectInventoryPotionDeadRising')) < 100)
do
Inventory.AddItemOfType(GetLocalHero(), 'ObjectInventoryPotionDeadRising')
end
It tops you up to 100 potions of each type every time the screen fades to black... (since I'm so filthy rich, it's only an annoyance to have to go buy potions... never mind that I'm virtually invincible at this point, anyway...)
[Updated on: Thu, 24 September 2015 14:03] Report message to a moderator
|
|
|
Re: Improved script injection method |
Fri, 25 September 2015 03:29 |
TheGeniusSavant
Messages: 68 Registered: September 2015
|
Member |
|
|
Yeah... got tired of the kiddos sending me all over Albion looking for Toy Bows and Porcelain Dolls... so I added this... I <3 LUA!!!
Toggle spoiler
local fillGiftItems = {
'ObjectInventoryGiftChessboard',
'ObjectInventoryGiftChocolates',
'ObjectInventoryGiftFlowers',
'ObjectInventoryGiftGoblet',
'ObjectInventoryGiftHandMirror',
'ObjectInventoryGiftJewellery',
'ObjectInventoryGiftPerfume',
'ObjectInventoryGiftFruitBowlSilver',
'ObjectInventoryGiftRing',
'ObjectInventoryGiftToyBow',
'ObjectInventoryGiftToyGun',
'ObjectInventoryGiftToyHorse',
'ObjectInventoryGiftToyPorcelainDoll',
'ObjectInventoryGiftToyRagDoll',
'ObjectInventoryGiftToySword',
'ObjectInventoryGiftToyTeddyBear',
'ObjectInventoryGiftGemAmethyst',
'ObjectInventoryGiftGemDiamond',
'ObjectInventoryGiftGemEmerald',
'ObjectInventoryGiftGemJet',
'ObjectInventoryGiftGemRuby',
'ObjectInventoryGiftGemPearl',
'ObjectInventoryGiftGemTopaz'
}
for key,value in pairs(fillGiftItems) do
while ((Inventory.GetNumberOfItemsOfType(GetLocalHero(), value)) < 5)
do
Inventory.AddItemOfType(GetLocalHero(), value)
end
end
|
|
|
Re: Improved script injection method |
Thu, 25 May 2017 08:06 |
Thatoneperson
Messages: 2 Registered: May 2017
|
Junior Member |
|
|
For some reason I had to change the lines
RunScript("scripts\\MyMod\\MyScript02.lua")
RunScript("scripts\\MyMod\\MyScript01.lua")
to
RunScript("MyMod/MyScript01.lua")
RunScript("MyMod/MyScript02.lua")
Before this started working.
I'm not sure if it's something unique to my installation, but I thought I would share in case it helps anyone else.
[Updated on: Wed, 04 October 2017 12:06] Report message to a moderator
|
|
|
Re: Improved script injection method |
Sat, 03 February 2018 23:18 |
SaintLucifer1776
Messages: 2 Registered: January 2018
|
Junior Member |
|
|
I spent the last two hours getting this down as I personally didn't feel like hunting for anything. It gives you all cosmetics, clothing, normal furniture,collectible paintings, weapons, spells, gifts, and 100 potions (Admittedly I stole the code for the gifts and potions from TheGeniusSavant). Wait until you've at least gotten to be able to use all modes of weapons normally before using it, otherwise I've heard your game will freeze if you try to enter the road to rule for the first time if you have all weapons.
In hindsight, I should have put this as MyScript02 as I have multiples of gauntlets in my armory. What that means for spell weaving is anyone's guess. Other than that, it should have no problems.
On another note, thank you guys so much for keeping this forum up and running with great information as I don't know what I'd do without it for modding this game! Hopefully we can do similar, if not greater stuff with Fable 4 whenever that's released.
|
|
|
|
|
|
|
|
|
|
|
|
|
|