Skip to content

Commit

Permalink
v0.3 release
Browse files Browse the repository at this point in the history
  • Loading branch information
kaosnyrb committed May 1, 2020
1 parent be2a875 commit 752a0da
Show file tree
Hide file tree
Showing 24 changed files with 5 additions and 18 deletions.
14 changes: 0 additions & 14 deletions Undaunted/RewardUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,13 @@ namespace Undaunted
bool found = false;
while (!found)
{
ModInfo* mod;
dataHandler->modList.loadedMods.GetNthItem(rand() % dataHandler->modList.loadedMods.count, mod);
_MESSAGE("Loading Reward from: %s ", mod->name);
const ModInfo* modInfo = dataHandler->LookupModByName(mod->name);
int type = rand() % 2;
TESObjectWEAP* weapon = NULL;
TESObjectARMO* armour = NULL;
//type = 0;
switch (type)
{
case 0:
if (dataHandler->weapons.count == 0)
{
_MESSAGE("No weapons found in: %s ", mod->name);
break;
}
dataHandler->weapons.GetNthItem(rand() % dataHandler->weapons.count, weapon);
if (!weapon->IsPlayable()) continue;
if (!weapon->Has3D()) continue;
Expand All @@ -50,11 +41,6 @@ namespace Undaunted
if (!IsWeaponLevelOk(weapon, playerlevel)) continue;
return weapon->formID;
case 1:
if (dataHandler->armors.count == 0)
{
_MESSAGE("No armors found in: %s ", mod->name);
break;
}
dataHandler->armors.GetNthItem(rand() % dataHandler->armors.count, armour);
if(exclude.find(armour) != exclude.end())
if (armour->IsPlayable()) continue;
Expand Down
Binary file modified datafiles/SKSE/Plugins/Undaunted.dll
Binary file not shown.
Binary file modified datafiles/Scripts/Undaunted_Activator.pex
Binary file not shown.
Binary file modified datafiles/Scripts/Undaunted_RewardActivator.pex
Binary file not shown.
Binary file modified datafiles/Scripts/Undaunted_SetScale.pex
Binary file not shown.
Binary file modified datafiles/Scripts/Undaunted_SystemScript.pex
Binary file not shown.
Binary file modified datafiles/Scripts/Undaunted_TestQuest01.pex
Binary file not shown.
3 changes: 2 additions & 1 deletion datafiles/Source/Scripts/Undaunted_Activator.psc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ EndEvent

int Function StartEvent()
if (!isSystemReady())
Debug.Notification("Undaunted initialising...")
int BadRegionList = JValue.readFromFile("Data/Undaunted/BadRegion.json")
int bri = JValue.count(BadRegionList)
while bri > 0
Expand Down Expand Up @@ -81,7 +82,7 @@ Event OnUpdate()
UnregisterForUpdate()
return
EndIf
Debug.Notification("questProperty Stage: " + QuestStage.GetValue())
;Debug.Notification("questProperty Stage: " + QuestStage.GetValue())
if (!isSystemReady())
;If we've got here something has gone wrong. Force a refresh.
StartEvent()
Expand Down
4 changes: 2 additions & 2 deletions datafiles/Source/Scripts/Undaunted_RewardActivator.psc
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ Quest Property questProperty Auto
GlobalVariable Property QuestStage auto

event onActivate(objectReference akActivator)
Debug.Notification("questProperty Stage: " + questProperty.GetCurrentStageID())
;Debug.Notification("questProperty Stage: " + questProperty.GetCurrentStageID())
if (QuestStage.GetValue() == 20)
SpawnRandomReward(RewardMarker)
SpawnRandomReward(RewardMarker,Game.GetPlayer().GetLevel())
questProperty.SetCurrentStageID(30)
QuestStage.SetValue(30)
endif
Expand Down
2 changes: 1 addition & 1 deletion datafiles/Source/Scripts/Undaunted_SystemScript.psc
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ bool Function SetXMarker(objectReference markerref) global native

float Function StartBounty(String WorldspaceName) global native

Function SpawnRandomReward(objectReference markerref) global native
Function SpawnRandomReward(objectReference markerref,int playerlevel) global native
Binary file removed datafiles/meshes/undaunted/platform.nif
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified x64/Debug/Undaunted.ilk
Binary file not shown.
Binary file modified x64/Debug/Undaunted.pdb
Binary file not shown.

0 comments on commit 752a0da

Please sign in to comment.