I get an error message now when I launch the game sol:runtime error: ... ragons Dogma2\reframework\autorun\completelyCyclops,lua:4 attenmpt to compare number with userdata stack traceback: ...ragons Dogma 2\reframework\aurun\CompletelyCyclops.lua4: in main chunk how can I solve this problem
That's weird ,but not seems to be fatal. Maybe it's because the script is loaded too earlier. If you click `reset script`,can the mod work ?still error message?
maybe you need to install additional reframework tools like ScriptCore or XYZApi made by this author (if it is not in description you can find it in his mod files uploaded for dragons dogma 2). I am pretty sure you need to install XYZApi as I see that the script fails on line 3 :D so very begging
I encounter the same problem, but after I add z to the .lua name "ZCompletelyCyclops.lua" so the script load last after all other script fixes the issue for me at least
Could someone please provide a modified code that will allow me to replace a certain enemy type with a different enemy? I tried my hand it for a while. But I'm noob at Lua as it is.
For example, I want to replace all Cyclops with only Gorechimeras. How should I go about modifying the code?
Ye been messing around with the script and you can change them. 250000 Cyclops 251000 Ogre 252000 Golem 253000 Griffin 254000 Chimera 255000 Medusa (cant attack) 256000 Minotaur 257000 Drake 258000 Crash? 259000 Colossus titan thing 260000 Garm
Lets say i wanted to spawn gore chimera would it be like this cause i keep crashing.?
local Gorechimera={} for _,field in pairs(sdk.find_type_definition("app.CharacterID"):get_fields()) do local value=field:get_data() if value~=nil and value >0 and field:get_name():find("ch254201")~=nil then table.insert(Gorechimera,value) --print(value,field:get_name()) end end sdk.hook( sdk.find_type_definition("app.GenerateSelector"):get_method("randomSelect") , function (args) local this=sdk.to_managed_object(args[2]) local t=this["<Table>k__BackingField"] if t~=nil and t._EnemySetInfo ~=nil then local tableRow=t._EnemySetInfo._BasicRowDatas local ct=tableRow:get_Count()-1 for i=0,ct do local rowData=tableRow[i] if rowData._CharaID~=nil then rowData._CharaID = Gorechimera[math.random(1,#Gorechimera)] print("Gorechimera!",rowData._CharaID) end end end end,nil ) My modding knowledge is about the same as a goblin in vermund help please. :3
The only thing you need to change is where it says find("ch256001_") replace the number with the desired monster ID. Do not get rid of the ch or the underscore, just change the number. You don't need to replace the word "cyclops"; your computer doesn't care if you make an array called cyclops and fill it with minotaurs.
Gorechimeras only work in unmoored world I guess, tried it and the script works, but the spawn rate is 0 in normal game, so it creates enemy-free world to explore.
Edit: Actually there are 3 different ID's for gorechimera there, and the correct one is: ch254001_ with it, it spawns like everything else :)
I did a thing ;) I hope some people will enjoy it. Thank you to Xyzkljl1 for the code! ALL CREDITS to him. I just added some IDs for substrings and made a random selection before execution.
Have fun
-- Add IDs with specified substrings to the cyclops table for _, field in pairs(sdk.find_type_definition("app.CharacterID"):get_fields()) do local value = field:get_data() if value ~= nil and value > 0 then local name = field:get_name() if name:find("ch250000_") == 1 or name:find("ch299210") == 1 or name:find("ch225000") == 1 or name:find("ch225001") == 1 or name:find("ch225002") == 1 or name:find("ch220001") == 1 or name:find("ch220003") == 1 or name:find("ch221000") == 1 or name:find("ch221001") == 1 or name:find("ch221002") == 1 or name:find("ch221003") == 1 or name:find("ch221004") == 1 or name:find("ch224001") == 1 or name:find("ch224002") == 1 or name:find("ch260001") == 1 or name:find("ch260000") == 1 or name:find("ch222003") == 1 or name:find("ch257000") == 1 or name:find("ch257001") == 1 or name:find("ch251001") == 1 or name:find("ch251000") == 1 or name:find("ch226002") == 1 or name:find("ch226003") == 1 or name:find("ch229000") == 1 or name:find("ch253000") == 1 or name:find("ch223001") == 1 or name:find("ch230001") == 1 or name:find("ch230002") == 1 or name:find("ch255000") == 1 or name:find("ch228000") == 1 or name:find("ch228002") == 1 or name:find("ch254000") == 1 or name:find("ch254001") == 1 or name:find("ch299230") == 1 or name:find("ch256001") == 1 or name:find("ch252000") == 1 or name:find("ch227000") == 1 or name:find("ch227001") == 1 or name:find("ch255010") == 1 or name:find("ch253010") == 1 or name:find("ch253011") == 1 then table.insert(cyclops, value) end end end -- Hook into randomSelect method to select a random ID from cyclops sdk.hook( sdk.find_type_definition("app.GenerateSelector"):get_method("randomSelect"), function (args) local this = sdk.to_managed_object(args[2]) local t = this["<Table>k__BackingField"] if t ~= nil and t._EnemySetInfo ~= nil then local tableRow = t._EnemySetInfo._BasicRowDatas local ct = tableRow:get_Count() - 1 for i = 0, ct do local rowData = tableRow[i] if rowData._CharaID ~= nil then local randomIndex = math.random(1, #cyclops) rowData._CharaID = cyclops[randomIndex] print("Enemy Spawned:", rowData._CharaID) end end end end, nil )
Again, ALL CREDITS to Xyzkljl1, the uploader of Completly Cyclops. I just modified his code.
You can delete IDs you don't want from the list. Everytime an enemy type spawns, it will be one of the list instead.
Medusa is kinda bugged so I should take it off the list but it's always good for materials and to get her head. Big baddies in dungeons can be a problem too, the code doesn't isolate the spawns by areas (it is mostly likely doable though?). Another bug can occur when a quest needs to load a monster and another one shows up instead.
I put the IDs of the big bosses from the Unmoored World too. Big fights ahead.
is it possible for you to decrease the boss spawn rate or only allow one boss per enemy group? your edits are very good and work well but sometimes there are 3-4 unmoored world dragons and other strong bosses which makes it impossible to fight them
It seems the game spawns enemies in "groups of a type" and our randomizer script can't modify that. Without access to the game's source code, I can't implement such changes.
Haven't tested it, but this should (20% of the spanws will be replaced) :
local cyclops = {} -- Add IDs with specified substrings to the cyclops table for _, field in pairs(sdk.find_type_definition("app.CharacterID"):get_fields()) do local value = field:get_data() if value ~= nil and value > 0 then local name = field:get_name() if name:find("ch250000_") == 1 or name:find("ch299210") == 1 or name:find("ch225000") == 1 or name:find("ch225001") == 1 or name:find("ch225002") == 1 or name:find("ch220001") == 1 or name:find("ch220003") == 1 or name:find("ch221000") == 1 or name:find("ch221001") == 1 or name:find("ch221002") == 1 or name:find("ch221003") == 1 or name:find("ch221004") == 1 or name:find("ch224001") == 1 or name:find("ch224002") == 1 or name:find("ch260001") == 1 or name:find("ch260000") == 1 or name:find("ch222003") == 1 or name:find("ch257000") == 1 or name:find("ch257001") == 1 or name:find("ch251001") == 1 or name:find("ch251000") == 1 or name:find("ch226002") == 1 or name:find("ch226003") == 1 or name:find("ch229000") == 1 or name:find("ch253000") == 1 or name:find("ch223001") == 1 or name:find("ch230001") == 1 or name:find("ch230002") == 1 or name:find("ch255000") == 1 or name:find("ch228000") == 1 or name:find("ch228002") == 1 or name:find("ch254000") == 1 or name:find("ch254001") == 1 or name:find("ch299230") == 1 or name:find("ch256001") == 1 or name:find("ch252000") == 1 or name:find("ch227000") == 1 or name:find("ch227001") == 1 or name:find("ch255010") == 1 or name:find("ch253010") == 1 or name:find("ch253011") == 1 then table.insert(cyclops, value) end end end -- Hook into randomSelect method to select a random ID from cyclops sdk.hook( sdk.find_type_definition("app.GenerateSelector"):get_method("randomSelect"), function (args) local this = sdk.to_managed_object(args[2]) local t = this["<Table>k__BackingField"] if t ~= nil and t._EnemySetInfo ~= nil then local tableRow = t._EnemySetInfo._BasicRowDatas local ct = tableRow:get_Count() - 1 for i = 0, ct do local rowData = tableRow[i] if rowData._CharaID ~= nil then -- Generate a random number between 1 and 5 local chance = math.random(1, 5) if chance == 1 then local randomIndex = math.random(1, #cyclops) rowData._CharaID = cyclops[randomIndex] print("Enemy Spawned:", rowData._CharaID) end end end end end, nil )
Thanks for @FanfanPDS, I've give it a tried. It works like there's 20% rate to replaced all mobs around in certain range at once. I'm not very familiar with scripts. But seems replace function are just working like that so we can't make the replace rate implement to "each" mobs.
I've asked before elsewhere but have never received an answer. Do you think it's possible to make a mod that increases the enemy spawn count? Like 2X or 3X enemy spawns?
I'd like to know if it's even possible to do but I haven't managed to get any idea from modders who know more about the game. Hopefully one of them answers me just to let me know if it even looks possible.
92 comments
sol:runtime error: ... ragons Dogma2\reframework\autorun\completelyCyclops,lua:4 attenmpt to compare number with userdata stack traceback:
...ragons Dogma 2\reframework\aurun\CompletelyCyclops.lua4: in main chunk
how can I solve this problem
Maybe it's because the script is loaded too earlier.
If you click `reset script`,can the mod work ?still error message?
plz send me the screenshot of whole error message.
If not,Idk.
For example, I want to replace all Cyclops with only Gorechimeras. How should I go about modifying the code?
250000 Cyclops
251000 Ogre
252000 Golem
253000 Griffin
254000 Chimera
255000 Medusa (cant attack)
256000 Minotaur
257000 Drake
258000 Crash?
259000 Colossus titan thing
260000 Garm
ch224000_00;579176354;Slime
ch250000_10;597201144;Cyclops
ch250000_02;2691537244;Cyclops
ch250000_21;377282979;Cyclops
ch299003_A_40;958755609;Ox
ch253001_00;3369196004;Sphinx
ch230000;3118161942;Rogue
ch299030_A_00;3414342046;Pig
ch223002;463959734;Blackdog
ch259000_00;3285740536;Talos
ch220003_01;3404862741;Knacker
ch299240;2408295807;Spider
ch224001;1440405779;Ooze
ch226003_00;422306432;Skeleton Lord
ch299410;3831640274;Crow
ch253010_00;4243003424;Vermund Purgener
ch230002_02;179954184;Lost Mercenary
ch255011;3585982719;Volcanic Island Purgener
ch258000_30;1403005379;Dragon
ch254001;3926958653;Gorechimera
ch230002_05;1729485145;Lost Mercenary
ch230002_04;4058460161;Lost Mercenary
ch224001_00;453830893;Ooze
ch258000;2218318624;Dragon
ch299220_A_00;261171242;Rooster
ch230012;2636845582;Coral Snake
ch226000_00;3778529772;Skeleton
ch252000_02;2224608577;Golem
ch299003_A_31;3896343726;Ox
ch220002_02;207240957;Chopper
ch221000_00;1563777152;Saurian
ch230001_05;2738350696;Lost Mercenary
ch250000_01;2314122076;Cyclops
ch299020_B_00;660614732;Goat
ch220001_11;3959282474;Hobgoblin
ch250000;4200835371;Cyclops
ch220000_10;2673306579;Goblin
ch230000_03;33337065;Rogue
ch226002;996797807;Skeleton
ch226003;2778171479;Skeleton Lord
ch220003;3901007162;Knacker
ch299031_B_00;1101403807;Wild Boar
ch222003_20;4279131294;Succubus
ch230001_06;2368799945;Lost Mercenary
ch220001_12;1072978625;Hobgoblin
ch220001_20;2108697931;Hobgoblin
ch223002_00;1641985855;Blackdog
ch230012_02;144325129;Coral Snake
ch224002;4095108099;Sludge
ch255000;1523627639;Medusa
ch253010;3796773925;Vermund Purgener
ch255011_00;3417537573;Volcanic Island Purgener
ch230000_01;1678146412;Rogue
ch220001_23;1433009442;Hobgoblin
ch226001_03;1831724056;Skeleton
ch256001_00;1057828479;Goreminotaur
ch228002_00;237829752;Stout Undead
ch299003_A_51;1931977881;Ox
ch230000_04;2405515181;Rogue
ch299230_A_00;3025108868;Leapworm
ch222003;2537311039;Succubus
ch225002_00;804066478;Specter
ch226002_05;3069007639;Skeleton
ch228002;1668345160;Stout Undead
ch228000_00;2967309721;Undead
ch229000_00;2629601821;Dullahan
ch299221_A_00;368362284;Chicken
ch258001;1472891121;Nex
ch299010;2448464762;Stag
ch299200_A_00;3794158447;Rabbit
ch260000_00;169713426;Garm
ch258000_00;2631267673;Dragon
ch257000_00;2133916449;Drake
ch220000_02;505830464;Goblin
ch299003_A_50;614907740;Ox
ch299003_A_22;1944501456;Ox
ch230000_02;1999194350;Rogue
ch252000;2727149558;Golem
ch250000_90;835332328;Cyclops
ch299430;2489368601;Bird
ch228000;3664825389;Undead
ch299003_A_61;1407209575;Ox
ch230001_01;3794841598;Lost Mercenary
ch220000_03;3354236422;Goblin
ch251001;2094960111;Grim Ogre
ch223001_00;4267949999;Redwolf
ch254000_00;3550884773;Chimera
ch226000;172545239;Skeleton
ch254000;920145308;Chimera
ch252000_03;812385671;Golem
ch259000_91;2741660177;Talos
ch299210;4246695049;Rat
ch220001_13;265987869;Hobgoblin
ch220001_10;1119391072;Hobgoblin
ch230002_03;3930224407;Lost Mercenary
ch299210_A_00;3671762608;Rat
ch250000_11;2487358235;Cyclops
ch251000_00;2138374751;Ogre
ch299620;1474873777;Grasshopper
ch222003_00;2025923066;Succubus
ch220001;824292082;Hobgoblin
ch299610_A_00;2978377446;Butterfly
ch220001_01;820168355;Hobgoblin
ch254100;688186494;Chimera
ch260001;263786390;Warg
ch250000_00;797468852;Cyclops
ch225001_00;4115095027;Phantasm
ch299240_A_00;1639472460;Spider
ch222000_00;3700061936;Harpy
ch260001_00;247902159;Warg
ch299003_A_90;2189330139;Ox
ch220000_04;3926755095;Goblin
ch228001_00;2898068966;Undead
ch256000_00;3061246416;Minotaur
ch227001;715429530;Wight
ch220001_21;3746646715;Hobgoblin
ch299003_A_14;1016329036;Ox
ch299003_A_12;1638238999;Ox
ch256001;1488712196;Goreminotaur
ch230001_04;1434846056;Lost Mercenary
ch254101_00;2114484143;Gorechimera
ch299031_A_00;929681477;Wild Boar
ch220003_03;2246101787;Knacker
ch223001_01;1432231968;Redwolf
ch230002_06;2698864386;Lost Mercenary
ch220000_91;3738879281;Goblin
ch250000_22;884021677;Cyclops
ch225000_00;2446613150;Phantom
ch299200_B_00;4037765830;Rabbit
ch259000_90;1992394587;Talos
ch230001;3139077209;Lost Mercenary
ch226001_06;409454115;Skeleton
ch222001;44571581;Venin Harpy
ch220000_90;979398568;Goblin
ch221003;3737589358;Magma Scale
ch255010;2757629441;Sacred Arbor Purgener
ch253000_00;3547788120;Griffin
ch251001_00;786298456;Grim Ogre
ch259000;2556420731;Talos
ch220000_12;498711577;Goblin
ch254001_00;3236853785;Gorechimera
ch260000;3305878809;Garm
ch299011_A_00;692713558;Doe
ch299003_A_00;4073166252;Ox
ch299031;856977504;Wild Boar
ch299221;2452937962;Chicken
ch299020_A_00;1656656733;Goat
ch222002;352780568;Gore Harpy
ch227000;3402660597;Lich
ch258001_00;2099579791;Nex
ch299003;2755368963;Ox
ch299430_A_00;1454396558;Bird
ch299420_A_00;1054074961;Seabird
ch299620_A_00;282151500;Grasshopper
ch299003_A_13;1094611796;Ox
ch226000_01;3499882976;Skeleton
ch252000_01;1156291195;Golem
ch299003_A_15;369023852;Ox
ch299030;3543801350;Pig
ch299003_A_20;677531604;Ox
ch221004_00;597146809;Serpent
ch253011_00;355142415;Island Encampment Purgener
ch221001_00;2286111823;Asp
ch299011;857350139;Doe
ch255000_01;4170025353;Medusa
ch299003_A_10;3285466677;Ox
ch221003_00;3777932813;Magma Scale
ch227000_00;3566561083;Lich
ch299600;3331845572;Fish
ch299200;1825882043;Rabbit
ch258000_20;1359728607;Dragon
ch299003_B_00;3790237688;Ox
ch254101;525456013;Gorechimera
ch255000_90;114855116;Medusa
ch254201_00;2997168797;Gorechimera
ch222000;2034931361;Harpy
ch220000;4075430906;Goblin
ch299003_A_21;1209676654;Ox
ch257001_00;3538966457;Lesser Dragon
ch240000;2326588354;Battahl Purgener
ch255010_00;2475491578;Sacred Arbor Purgener
ch221000;984436780;Saurian
ch299410_A_00;597330038;Crow
ch250000_20;3906583030;Cyclops
ch226002_06;1862515730;Skeleton
ch230001_02;328189375;Lost Mercenary
ch220001_03;714445199;Hobgoblin
ch223000_00;3503729693;Wolf
ch230012_04;1588377750;Coral Snake
ch255000_00;3307750390;Medusa
ch220001_22;2402686166;Hobgoblin
ch220000_00;3831138060;Goblin
ch221002;3773499102;Rattler
ch254100_00;1700400553;Chimera
ch299003_A_30;1065282196;Ox
ch253011;2719193164;Island Encampment Purgener
ch220003_02;1873000869;Knacker
ch226002_03;2774400895;Skeleton
ch220000_01;681487416;Goblin
ch299003_A_11;1830828078;Ox
ch220003_00;2774043831;Knacker
ch258000_10;1032736632;Dragon
ch220002_03;86583291;Chopper
ch227001_00;186889532;Wight
ch229000;3871427245;Dullahan
ch253000;3136630913;Griffin
ch252000_00;2288155078;Golem
ch299600_A_00;310693883;Fish
ch220000_13;3340998717;Goblin
ch226001_01;2034177105;Skeleton
ch230100;1046800430;Scavenger
ch299220;4080486209;Rooster
ch230002;3353892892;Lost Mercenary
ch250000_12;2142776531;Cyclops
ch220002_01;3236912930;Chopper
ch251000;2421448835;Ogre
ch230002_01;3740205120;Lost Mercenary
ch299420;561151372;Seabird
ch222002_00;1993240449;Gore Harpy
ch228001;52723289;Undead
ch225002;2286707282;Specter
ch299610;482197764;Butterfly
ch226002_01;325028463;Skeleton
ch220001_00;3023839524;Hobgoblin
ch221002_20;2605756573;Rattler
ch220000_11;4050526927;Goblin
ch220002;1659799223;Chopper
ch253001;1436780457;Sphinx
ch230001_03;3129435526;Lost Mercenary
ch256000;777260744;Minotaur
ch299400;3336645871;Bat
ch228001_01;2515715031;Undead
ch223000;3074847708;Wolf
ch226001;2162458964;Skeleton
ch222001_00;1086493832;Venin Harpy
ch226001_05;997659575;Skeleton
ch254200_00;165035972;Chimera
ch223001;3826873172;Redwolf
ch225001;1670555315;Phantasm
ch299400_A_00;3479796288;Bat
ch299230;3699103987;Leapworm
ch240000_00;894557148;Battahl Purgener
ch299003_A_91;1175099639;Ox
ch299020;1005028787;Goat
ch221004;821632591;Serpent
ch224000;3727708212;Slime
ch228000_01;1089854000;Undead
ch254201;424837784;Gorechimera
ch230100_04;368370889;Scavenger
ch225000;2548825760;Phantom
ch220001_02;3671779649;Hobgoblin
ch257001;3009322132;Lesser Dragon
ch224002_00;2686608683;Sludge
ch299003_A_32;4173192605;Ox
ch299010_A_00;879783835;Stag
ch299003_A_52;3404649426;Ox
ch299003_A_62;3832243964;Ox
ch257000;2617990880;Drake
ch220000_14;886594300;Goblin
ch254200;819242198;Chimera
ch299003_A_60;4049672477;Ox
ch220002_00;617454969;Chopper
ch221001;3739136302;Asp
local Gorechimera={}
for _,field in pairs(sdk.find_type_definition("app.CharacterID"):get_fields()) do
local value=field:get_data()
if value~=nil and value >0 and field:get_name():find("ch254201")~=nil then
table.insert(Gorechimera,value)
--print(value,field:get_name())
end
end
sdk.hook(
sdk.find_type_definition("app.GenerateSelector"):get_method("randomSelect")
, function (args)
local this=sdk.to_managed_object(args[2])
local t=this["<Table>k__BackingField"]
if t~=nil and t._EnemySetInfo ~=nil then
local tableRow=t._EnemySetInfo._BasicRowDatas
local ct=tableRow:get_Count()-1
for i=0,ct do
local rowData=tableRow[i]
if rowData._CharaID~=nil then
rowData._CharaID = Gorechimera[math.random(1,#Gorechimera)]
print("Gorechimera!",rowData._CharaID)
end
end
end
end,nil
)
My modding knowledge is about the same as a goblin in vermund help please. :3
find("ch256001_")
replace the number with the desired monster ID. Do not get rid of the ch or the underscore, just change the number. You don't need to replace the word "cyclops"; your computer doesn't care if you make an array called cyclops and fill it with minotaurs.
Edit: Actually there are 3 different ID's for gorechimera there, and the correct one is: ch254001_ with it, it spawns like everything else :)
I did a thing ;) I hope some people will enjoy it. Thank you to Xyzkljl1 for the code! ALL CREDITS to him. I just added some IDs for substrings and made a random selection before execution.
Have fun
-- Add IDs with specified substrings to the cyclops table
for _, field in pairs(sdk.find_type_definition("app.CharacterID"):get_fields()) do
local value = field:get_data()
if value ~= nil and value > 0 then
local name = field:get_name()
if name:find("ch250000_") == 1 or name:find("ch299210") == 1 or
name:find("ch225000") == 1 or name:find("ch225001") == 1 or
name:find("ch225002") == 1 or name:find("ch220001") == 1 or
name:find("ch220003") == 1 or name:find("ch221000") == 1 or
name:find("ch221001") == 1 or name:find("ch221002") == 1 or
name:find("ch221003") == 1 or name:find("ch221004") == 1 or
name:find("ch224001") == 1 or name:find("ch224002") == 1 or
name:find("ch260001") == 1 or name:find("ch260000") == 1 or
name:find("ch222003") == 1 or name:find("ch257000") == 1 or
name:find("ch257001") == 1 or name:find("ch251001") == 1 or
name:find("ch251000") == 1 or name:find("ch226002") == 1 or
name:find("ch226003") == 1 or name:find("ch229000") == 1 or
name:find("ch253000") == 1 or name:find("ch223001") == 1 or
name:find("ch230001") == 1 or name:find("ch230002") == 1 or
name:find("ch255000") == 1 or name:find("ch228000") == 1 or
name:find("ch228002") == 1 or name:find("ch254000") == 1 or
name:find("ch254001") == 1 or name:find("ch299230") == 1 or
name:find("ch256001") == 1 or name:find("ch252000") == 1 or
name:find("ch227000") == 1 or name:find("ch227001") == 1 or
name:find("ch255010") == 1 or name:find("ch253010") == 1 or
name:find("ch253011") == 1 then
table.insert(cyclops, value)
end
end
end
-- Hook into randomSelect method to select a random ID from cyclops
sdk.hook(
sdk.find_type_definition("app.GenerateSelector"):get_method("randomSelect"),
function (args)
local this = sdk.to_managed_object(args[2])
local t = this["<Table>k__BackingField"]
if t ~= nil and t._EnemySetInfo ~= nil then
local tableRow = t._EnemySetInfo._BasicRowDatas
local ct = tableRow:get_Count() - 1
for i = 0, ct do
local rowData = tableRow[i]
if rowData._CharaID ~= nil then
local randomIndex = math.random(1, #cyclops)
rowData._CharaID = cyclops[randomIndex]
print("Enemy Spawned:", rowData._CharaID)
end
end
end
end,
nil
)
Again, ALL CREDITS to Xyzkljl1, the uploader of Completly Cyclops. I just modified his code.
Medusa is kinda bugged so I should take it off the list but it's always good for materials and to get her head. Big baddies in dungeons can be a problem too, the code doesn't isolate the spawns by areas (it is mostly likely doable though?). Another bug can occur when a quest needs to load a monster and another one shows up instead.
I put the IDs of the big bosses from the Unmoored World too. Big fights ahead.
Also, I'd like the see a updated monster list with xp values if possible please, thanks.
local cyclops = {}
-- Add IDs with specified substrings to the cyclops table
for _, field in pairs(sdk.find_type_definition("app.CharacterID"):get_fields()) do
local value = field:get_data()
if value ~= nil and value > 0 then
local name = field:get_name()
if name:find("ch250000_") == 1 or name:find("ch299210") == 1 or
name:find("ch225000") == 1 or name:find("ch225001") == 1 or
name:find("ch225002") == 1 or name:find("ch220001") == 1 or
name:find("ch220003") == 1 or name:find("ch221000") == 1 or
name:find("ch221001") == 1 or name:find("ch221002") == 1 or
name:find("ch221003") == 1 or name:find("ch221004") == 1 or
name:find("ch224001") == 1 or name:find("ch224002") == 1 or
name:find("ch260001") == 1 or name:find("ch260000") == 1 or
name:find("ch222003") == 1 or name:find("ch257000") == 1 or
name:find("ch257001") == 1 or name:find("ch251001") == 1 or
name:find("ch251000") == 1 or name:find("ch226002") == 1 or
name:find("ch226003") == 1 or name:find("ch229000") == 1 or
name:find("ch253000") == 1 or name:find("ch223001") == 1 or
name:find("ch230001") == 1 or name:find("ch230002") == 1 or
name:find("ch255000") == 1 or name:find("ch228000") == 1 or
name:find("ch228002") == 1 or name:find("ch254000") == 1 or
name:find("ch254001") == 1 or name:find("ch299230") == 1 or
name:find("ch256001") == 1 or name:find("ch252000") == 1 or
name:find("ch227000") == 1 or name:find("ch227001") == 1 or
name:find("ch255010") == 1 or name:find("ch253010") == 1 or
name:find("ch253011") == 1 then
table.insert(cyclops, value)
end
end
end
-- Hook into randomSelect method to select a random ID from cyclops
sdk.hook(
sdk.find_type_definition("app.GenerateSelector"):get_method("randomSelect"),
function (args)
local this = sdk.to_managed_object(args[2])
local t = this["<Table>k__BackingField"]
if t ~= nil and t._EnemySetInfo ~= nil then
local tableRow = t._EnemySetInfo._BasicRowDatas
local ct = tableRow:get_Count() - 1
for i = 0, ct do
local rowData = tableRow[i]
if rowData._CharaID ~= nil then
-- Generate a random number between 1 and 5
local chance = math.random(1, 5)
if chance == 1 then
local randomIndex = math.random(1, #cyclops)
rowData._CharaID = cyclops[randomIndex]
print("Enemy Spawned:", rowData._CharaID)
end
end
end
end
end,
nil
)
It works like there's 20% rate to replaced all mobs around in certain range at once.
I'm not very familiar with scripts.
But seems replace function are just working like that so we can't make the replace rate implement to "each" mobs.
i was literally scrolling for 15min so i can find this one mod, non yet made it happen