KittymirCuten Posted July 16, 2020 Share Posted July 16, 2020 (edited) I thought my mod was all done. Worked out a ton of bugs with other modded features, now there's one last issue I am aware of that I just discovered. Creatures meant to be very rare spawns anywhere outside of the Grazelands are not working as intended. The Colossal Slaughterfish, and weather based Atronach/Corprus monster bits of the script are working fine. The problem is the two rare creatures the Kagouti Rex and Alitasaurus seem to be spawning extremely frequently. Begin AANyxPanthGiantScript Short TyrantLizardKing If ( MenuMode == 1 ) Return Endif if ( GetCurrentWeather == 5 ) if ( Player->GetEffect, sEffectInvisibility == 0 ) if ( Player->GetEffect, sEffectLevitate == 0 ) if ( CellChanged == 1 ) If ( Random100 >= 75 ) PlaceAtPC "AANyxPantatronach_storm", 1, 328, 1 Set TyrantLizardKing to 0 Endif Endif Endif Endif Endif if ( GetCurrentWeather == 6 ) if ( Player->GetEffect, sEffectInvisibility == 0 ) if ( Player->GetEffect, sEffectLevitate == 0 ) if ( CellChanged == 1 ) If ( Random100 >= 75 ) PlaceAtPC "AANyxPanatronach_flame", 1, 328, 1 Set TyrantLizardKing to 0 Endif Endif Endif Endif Endif if ( GetCurrentWeather == 8 ) if ( Player->GetEffect, sEffectInvisibility == 0 ) if ( Player->GetEffect, sEffectLevitate == 0 ) if ( CellChanged == 1 ) If ( Random100 >= 75 ) PlaceAtPC "AANyxPanatronach_frost", 1, 328, 1 Set TyrantLizardKing to 0 Endif Endif Endif Endif Endif if ( GetCurrentWeather == 9 ) if ( Player->GetEffect, sEffectInvisibility == 0 ) if ( Player->GetEffect, sEffectLevitate == 0 ) if ( CellChanged == 1 ) If ( Random100 >= 60 ) PlaceAtPC "AANyxPanatronach_frost", 1, 328, 1 Set TyrantLizardKing to 0 Endif Endif Endif Endif Endif if ( GetCurrentWeather == 7 ) if ( Player->GetEffect, sEffectInvisibility == 0 ) if ( Player->GetEffect, sEffectLevitate == 0 ) if ( CellChanged == 1 ) If ( Random100 >= 80 ) PlaceAtPC "corprus_stalker", 3, 128, 1 PlaceAtPC "corprus_lame", 4, 528, 1 PlaceAtPC "dreamer_f_01", 1, 628, 1 PlaceAtPC "dreamer", 1, 128, 1 PlaceAtPC "dreamer_02", 1, 328, 1 Set TyrantLizardKing to 0 Endif Endif Endif Endif Endif if ( CellChanged == 1 ) if ( GetInterior == 0 ) if ( Player->GetEffect, sEffectInvisibility == 0 ) if ( Player->GetEffect, sEffectLevitate == 0 ) if ( GetPCCell, "Wilderness" == 1 ) if ( player->GetItemCount, "AASkulOfEncounters" == 1 ) If ( Random100 >= 30 ) PlaySound "Slaughterfish Scream" PlaceAtPC "AAnYXpANTHgR8fISH", 1, 2828, 0 Messagebox "You see something massive approaching from the water." Set TyrantLizardKing to 0 Endif Endif Endif Endif Endif Endif Endif if ( CellChanged == 1 ) if ( GetInterior == 0 ) if ( Player->GetEffect, sEffectInvisibility == 0 ) if ( Player->GetEffect, sEffectLevitate == 0 ) if ( GetPCCell, "Wilderness" == 1 ) if ( player->GetItemCount, "AASkulOfEncounters" == 1 ) If ( Random100 >= 95 ) PlaySound "Slaughterfish Moan" PlaceAtPC "AAnYXpANTHgR8fISH", 1, 828, 1 Messagebox "You hear something massive approaching in the water." Set TyrantLizardKing to 0 Endif Endif Endif Endif Endif Endif Endif if ( CellChanged == 1 ) if ( GetInterior == 0 ) if ( Player->GetEffect, sEffectInvisibility == 0 ) if ( Player->GetEffect, sEffectLevitate == 0 ) if ( GetPCCell, "West Gash Region" == 1 ) if ( player->GetItemCount, "AASkulOfEncounters" == 1 ) If ( Random100 >= 98 ) PlaySound "AlitMoan" PlaceAtPC "AAAlitASaurusREEL", 3, 128, 1 Messagebox "You hear heavy footsteps behind you." Set TyrantLizardKing to 0 Endif Endif Endif Endif Endif Endif Endif If ( Player->"iswerewolf" == 0 ) if ( CellChanged == 1 ) if ( GetInterior == 0 ) if ( Player->GetEffect, sEffectInvisibility == 0 ) if ( Player->GetEffect, sEffectLevitate == 0 ) if ( GetPCCell, "West Gash Region" == 1 ) if ( player->GetItemCount, "AASkulOfEncounters" == 1 ) If ( Random100 >= 98 ) PlaySound "Kagouti Roar" PlaceAtPC "AAkagoutiRex2", 2, 128, 1 Messagebox "You hear tremendous footsteps behind you." Set TyrantLizardKing to 0 Endif Endif Endif Endif Endif Endif Endif Endif If ( Player->"iswerewolf" == 0 ) if ( CellChanged == 1 ) if ( GetInterior == 0 ) if ( Player->GetEffect, sEffectInvisibility == 0 ) if ( Player->GetEffect, sEffectLevitate == 0 ) if ( GetPCCell, "Solstheim, Moesring Mountains" == 1 ) if ( player->GetItemCount, "AASkulOfEncounters" == 1 ) If ( Random100 >= 99 ) PlaySound "Kagouti Roar" PlaceAtPC "AAkagoutiRex2", 2, 128, 1 Messagebox "You hear tremendous footsteps behind you." Set TyrantLizardKing to 0 Endif Endif Endif Endif Endif Endif Endif Endif If ( Player->"iswerewolf" == 0 ) if ( CellChanged == 1 ) if ( GetInterior == 0 ) if ( Player->GetEffect, sEffectInvisibility == 0 ) if ( Player->GetEffect, sEffectLevitate == 0 ) if ( GetPCCell, "Solstheim, Isinfier Plains" == 1 ) if ( player->GetItemCount, "AASkulOfEncounters" == 1 ) If ( Random100 >= 99 ) PlaySound "Kagouti Roar" PlaceAtPC "AAkagoutiRex2", 2, 128, 1 Messagebox "You hear tremendous footsteps behind you." Set TyrantLizardKing to 0 Endif Endif Endif Endif Endif Endif Endif Endif If ( Player->"iswerewolf" == 0 ) if ( CellChanged == 1 ) if ( GetInterior == 0 ) if ( Player->GetEffect, sEffectInvisibility == 0 ) if ( Player->GetEffect, sEffectLevitate == 0 ) if ( GetPCCell, "Solstheim, Hirstaang Forest" == 1 ) if ( player->GetItemCount, "AASkulOfEncounters" == 1 ) If ( Random100 >= 99 ) PlaySound "Kagouti Roar" PlaceAtPC "AAkagoutiRex2", 2, 128, 1 Messagebox "You hear tremendous footsteps behind you." Set TyrantLizardKing to 0 Endif Endif Endif Endif Endif Endif Endif Endif If ( Player->"iswerewolf" == 0 ) if ( CellChanged == 1 ) if ( GetInterior == 0 ) if ( Player->GetEffect, sEffectInvisibility == 0 ) if ( Player->GetEffect, sEffectLevitate == 0 ) if ( GetPCCell, "Solstheim, Felsaad Coast Region" == 1 ) if ( player->GetItemCount, "AASkulOfEncounters" == 1 ) If ( Random100 >= 99 ) PlaySound "Kagouti Roar" PlaceAtPC "AAkagoutiRex2", 2, 128, 1 Messagebox "You hear tremendous footsteps behind you." Set TyrantLizardKing to 0 Endif Endif Endif Endif Endif Endif Endif Endif If ( Player->"iswerewolf" == 0 ) if ( CellChanged == 1 ) if ( GetInterior == 0 ) if ( Player->GetEffect, sEffectInvisibility == 0 ) if ( Player->GetEffect, sEffectLevitate == 0 ) if ( GetPCCell, "Sheogorad Region" == 1 ) if ( player->GetItemCount, "AASkulOfEncounters" == 1 ) If ( Random100 >= 99 ) PlaySound "FabVermScream" PlaceAtPC "AANyxPanGiantFabr", 2, 128, 1 Messagebox "You hear tremendous footsteps behind you." Set TyrantLizardKing to 0 Endif Endif Endif Endif Endif Endif Endif Endif if ( CellChanged == 1 ) if ( GetInterior == 0 ) if ( Player->GetEffect, sEffectInvisibility == 0 ) if ( Player->GetEffect, sEffectLevitate == 0 ) if ( GetPCCell, "Sheogorad Region" == 1 ) if ( player->GetItemCount, "AASkulOfEncounters" == 1 ) If ( Random100 >= 92 ) PlaySound "AlitMoan" PlaceAtPC "AAAlitASaurusREEL", 3, 128, 1 Messagebox "You hear heavy footsteps behind you." Set TyrantLizardKing to 0 Endif Endif Endif Endif Endif Endif Endif If ( Player->"iswerewolf" == 0 ) if ( CellChanged == 1 ) if ( GetInterior == 0 ) if ( Player->GetEffect, sEffectInvisibility == 0 ) if ( Player->GetEffect, sEffectLevitate == 0 ) if ( GetPCCell, "Red Mountain Region" == 1 ) if ( player->GetItemCount, "AASkulOfEncounters" == 1 ) If ( Random100 >= 97 ) PlaySound "Kagouti Roar" PlaceAtPC "AAkagoutiRex2", 2, 128, 1 Messagebox "You hear tremendous footsteps behind you." Set TyrantLizardKing to 0 Endif Endif Endif Endif Endif Endif Endif Endif if ( CellChanged == 1 ) if ( GetInterior == 0 ) if ( Player->GetEffect, sEffectInvisibility == 0 ) if ( Player->GetEffect, sEffectLevitate == 0 ) if ( GetPCCell, "Red Mountain Region" == 1 ) if ( player->GetItemCount, "AASkulOfEncounters" == 1 ) If ( Random100 >= 89 ) PlaySound "AlitMoan" PlaceAtPC "AAAlitASaurusREEL", 3, 128, 1 Messagebox "You hear heavy footsteps behind you." Set TyrantLizardKing to 0 Endif Endif Endif Endif Endif Endif Endif If ( Player->"iswerewolf" == 0 ) if ( CellChanged == 1 ) if ( GetInterior == 0 ) if ( Player->GetEffect, sEffectInvisibility == 0 ) if ( Player->GetEffect, sEffectLevitate == 0 ) if ( GetPCCell, "Molag Amur Region" == 1 ) if ( player->GetItemCount, "AASkulOfEncounters" == 1 ) If ( Random100 >= 98 ) PlaySound "Kagouti Roar" PlaceAtPC "AAkagoutiRex2", 2, 128, 1 Messagebox "You hear tremendous footsteps behind you." Set TyrantLizardKing to 0 Endif Endif Endif Endif Endif Endif Endif Endif if ( CellChanged == 1 ) if ( GetInterior == 0 ) if ( Player->GetEffect, sEffectInvisibility == 0 ) if ( Player->GetEffect, sEffectLevitate == 0 ) if ( GetPCCell, "Molag Amur Region" == 1 ) if ( player->GetItemCount, "AASkulOfEncounters" == 1 ) If ( Random100 >= 60 ) PlaySound "AlitMoan" PlaceAtPC "AAAlitASaurusREEL", 3, 128, 1 Messagebox "You hear heavy footsteps behind you." Set TyrantLizardKing to 0 Endif Endif Endif Endif Endif Endif Endif If ( Player->"iswerewolf" == 0 ) if ( CellChanged == 1 ) if ( GetInterior == 0 ) if ( Player->GetEffect, sEffectInvisibility == 0 ) if ( Player->GetEffect, sEffectLevitate == 0 ) if ( GetPCCell, "Grazelands Region" == 1 ) if ( player->GetItemCount, "AASkulOfEncounters" == 1 ) If ( Random100 >= 70 ) PlaySound "Kagouti Roar" PlaceAtPC "AAkagoutiRex2", 3, 128, 1 Messagebox "You hear tremendous footsteps behind you." Set TyrantLizardKing to 0 Endif Endif Endif Endif Endif Endif Endif Endif If ( Player->"iswerewolf" == 0 ) if ( CellChanged == 1 ) if ( GetInterior == 0 ) if ( Player->GetEffect, sEffectInvisibility == 0 ) if ( Player->GetEffect, sEffectLevitate == 0 ) if ( GetPCCell, "Bitter Coast Region" == 1 ) if ( player->GetItemCount, "AASkulOfEncounters" == 1 ) If ( Random100 >= 95 ) PlaySound "Kagouti Roar" PlaceAtPC "AAkagoutiRex2", 2, 128, 1 Messagebox "You hear tremendous footsteps behind you." Set TyrantLizardKing to 0 Endif Endif Endif Endif Endif Endif Endif Endif if ( CellChanged == 1 ) if ( GetInterior == 0 ) if ( Player->GetEffect, sEffectInvisibility == 0 ) if ( Player->GetEffect, sEffectLevitate == 0 ) if ( GetPCCell, "Bitter Coast Region" == 1 ) if ( player->GetItemCount, "AASkulOfEncounters" == 1 ) If ( Random100 >= 92 ) PlaySound "AlitMoan" PlaceAtPC "AAAlitASaurusREEL", 3, 128, 1 Messagebox "You hear heavy footsteps behind you." Set TyrantLizardKing to 0 Endif Endif Endif Endif Endif Endif Endif If ( Player->"iswerewolf" == 0 ) if ( CellChanged == 1 ) if ( GetInterior == 0 ) if ( Player->GetEffect, sEffectInvisibility == 0 ) if ( Player->GetEffect, sEffectLevitate == 0 ) if ( GetPCCell, "Ascadian Isles Region" == 1 ) if ( player->GetItemCount, "AASkulOfEncounters" == 1 ) If ( Random100 >= 98 ) PlaySound "Kagouti Roar" PlaceAtPC "AAkagoutiRex2", 2, 128, 1 Messagebox "You hear tremendous footsteps behind you." Set TyrantLizardKing to 0 Endif Endif Endif Endif Endif Endif Endif Endif if ( CellChanged == 1 ) if ( GetInterior == 0 ) if ( Player->GetEffect, sEffectInvisibility == 0 ) if ( Player->GetEffect, sEffectLevitate == 0 ) if ( GetPCCell, "Ascadian Isles Region" == 1 ) if ( player->GetItemCount, "AASkulOfEncounters" == 1 ) If ( Random100 >= 92 ) PlaySound "AlitMoan" PlaceAtPC "AAAlitASaurusREEL", 3, 128, 1 Messagebox "You hear heavy footsteps behind you." Set TyrantLizardKing to 0 Endif Endif Endif Endif Endif Endif Endif If ( Player->"iswerewolf" == 0 ) if ( CellChanged == 1 ) if ( GetInterior == 0 ) if ( Player->GetEffect, sEffectInvisibility == 0 ) if ( Player->GetEffect, sEffectLevitate == 0 ) if ( GetPCCell, "Ashlands Region" == 1 ) if ( player->GetItemCount, "AASkulOfEncounters" == 1 ) If ( Random100 >= 98 ) PlaySound "Kagouti Roar" PlaceAtPC "AAkagoutiRex2", 2, 128, 1 Messagebox "You hear tremendous footsteps behind you." Set TyrantLizardKing to 0 Endif Endif Endif Endif Endif Endif Endif Endif if ( CellChanged == 1 ) if ( GetInterior == 0 ) if ( Player->GetEffect, sEffectInvisibility == 0 ) if ( Player->GetEffect, sEffectLevitate == 0 ) if ( GetPCCell, "Ashlands Region" == 1 ) if ( player->GetItemCount, "AASkulOfEncounters" == 1 ) If ( Random100 >= 92 ) PlaySound "AlitMoan" PlaceAtPC "AAAlitASaurusREEL", 3, 128, 1 Messagebox "You hear heavy footsteps behind you." Set TyrantLizardKing to 0 Endif Endif Endif Endif Endif Endif Endif If ( Player->"iswerewolf" == 0 ) if ( CellChanged == 1 ) if ( GetInterior == 0 ) if ( Player->GetEffect, sEffectInvisibility == 0 ) if ( Player->GetEffect, sEffectLevitate == 0 ) if ( GetPCCell, "Azura's Coast Region" == 1 ) if ( player->GetItemCount, "AASkulOfEncounters" == 1 ) If ( Random100 >= 98 ) PlaySound "Kagouti Roar" PlaceAtPC "AAkagoutiRex2", 2, 128, 1 Messagebox "You hear tremendous footsteps behind you." Set TyrantLizardKing to 0 Endif Endif Endif Endif Endif Endif Endif Endif if ( CellChanged == 1 ) if ( GetInterior == 0 ) if ( Player->GetEffect, sEffectInvisibility == 0 ) if ( Player->GetEffect, sEffectLevitate == 0 ) if ( GetPCCell, "Azura's Coast Region" == 1 ) if ( player->GetItemCount, "AASkulOfEncounters" == 1 ) If ( Random100 >= 94 ) PlaySound "AlitMoan" PlaceAtPC "AAAlitASaurusREEL", 3, 128, 1 Messagebox "You hear heavy footsteps behind you." Set TyrantLizardKing to 0 Endif Endif Endif Endif Endif Endif Endif End In the West Gash Region where I recently tried out my own mod assuming all the bugs were ironed out, I discovered the Kagouti Rex and Alitasaurus spawn very frequently. Even though there's only supposed to be a 2 out of 100 chance of them spawning, in an exterior cell on cell change in that region. Am I not understanding Random100 properly? What is likely at play here? edit: I am experimenting withif ( Random, 1000 >= 980 ) instead ofif ( Random, 100 >= 98 ) I'll see how it goes... Edit 2: Well it works properly this way. So problem fixed, just got a tiny bit of script fixing up to do now. Edited July 16, 2020 by KittyBastetinati Link to comment Share on other sites More sharing options...
ZWolol Posted July 17, 2020 Share Posted July 17, 2020 (edited) Random, 100 is a calculated random number (each time new).Random100 is a variable calculated in each cycle (will change only in the next cycle). if (Random100 > 80)...elseif (Random100 > 90) - the second one will never work. Edited July 17, 2020 by ZWolol Link to comment Share on other sites More sharing options...
Recommended Posts