-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNTR_temp.ws
1319 lines (1174 loc) · 44.1 KB
/
NTR_temp.ws
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
exec function startNTR() {
FactsAdd("ntr_quest_allowed", 2);
}
exec function NTR_lvl( tag : name, level : int ) {
NTR_SetRelativeLevel(tag, level);
}
exec function encTest(enable: bool) {
var encounter : CEncounter;
encounter = (CEncounter)theGame.GetEntityByTag( 'shop_20_fishermans_hut_alchemist_enc' );
if (encounter) {
NTR_notify("OK!");
encounter.EnableEncounter(enable);
if (!enable) {
encounter.ForceDespawnDetached();
// or encounter.LeaveArea() ?
} else {
encounter.EnterArea();
}
}
}
exec function debugBaron(optional force : int) {
var npc : CNewNPC;
npc = (CNewNPC)theGame.GetNPCByTag('ntr_baron_edward');
NTR_notify("GetImmortalityMode = " + npc.GetImmortalityMode());
npc.LogAllAbilities();
if (force == 1)
npc.ForceVulnerable();
else if (force == 2)
npc.Kill('dieee', 1);
else if (force == 3)
npc.abilityManager.OnOwnerRevived();
}
exec function testHorse() {
HorseWhistle();
}
// ShowCredits(ntr_credits_1, 0)
exec function test_msg() {
var showTime : float;
var timeLapseMessageKey : string;
var timeLapseAdditionalMessageKey : string;
showTime = 7.0;
timeLapseMessageKey = "ntr_test_msg";
timeLapseAdditionalMessageKey = "ntr_test_msg_add";
ShowTimeLapse(showTime, timeLapseMessageKey, timeLapseAdditionalMessageKey);
}
exec function credits(num : int) {
var effectName : name;
var template : CEntityTemplate;
var pos : Vector;
var logo : CEntity;
var result : Bool;
if (num == 1) {
effectName = 'ntr_credits_1';
} else if (num == 2) {
effectName = 'ntr_credits_2';
} else if (num == 3) {
effectName = 'ntr_credits_3';
} else if (num == 4) {
effectName = 'ntr_credits_4';
} else if (num == 5) {
effectName = 'ntr_credits_5';
}
logo = theGame.GetEntityByTag('ntr_logo_credits');
/*if (destoy) {
if (logo) {
logo.Destroy();
}
return;
}*/
if (!logo) {
template = (CEntityTemplate)LoadResource("dlc/dlcntr/data/entities/ntr_logo_entity.w2ent", true);
pos = thePlayer.GetWorldPosition();
pos.Z += 10.0;
logo = (CEntity)theGame.CreateEntity(template, pos);
logo.AddTag('ntr_logo_credits');
//result = logo.CreateAttachment(thePlayer, 'r_weapon', Vector(0, 0, 0), EulerAngles(0, 0, 0));
}
logo.StopAllEffects();
logo.PlayEffect(effectName);
}
// not work?
//NTR_MoveNPCsTo(oriana_test2, , 2.0)
exec function NTR_MoveNPCsTo(tag : name, target : name, optional speed : float) {
var i : int;
var l_npcs : array<CNewNPC>;
var l_aiTree : CAIMoveToAction;
theGame.GetNPCsByTag(tag, l_npcs);
l_aiTree = new CAIMoveToAction in theGame;
l_aiTree.OnCreated();
l_aiTree.params.targetTag = target;
l_aiTree.params.moveSpeed = speed;
l_aiTree.params.rotateAfterwards = false;
if( speed > 1.0 )
{
l_aiTree.params.moveType = MT_Run;
}
for ( i = 0; i < l_npcs.Size(); i+= 1 )
{
if (l_npcs[i].IsAlive()) {
l_npcs[i].ForceAIBehavior( l_aiTree, BTAP_Idle);
NTR_notify("Force move " + l_npcs[i]);
}
/*
BTAP_Unavailable,
BTAP_Idle,
BTAP_Emergency,
BTAP_Combat,
BTAP_FullCutscene,
BTAP_BelowIdle,
BTAP_AboveIdle,
BTAP_AboveIdle2,
BTAP_AboveEmergency,
BTAP_AboveEmergency2,
BTAP_AboveCombat,
BTAP_AboveCombat2
*/
}
}
/*function colorEntCommon(compN : int, h1 : Uint16, s1 : Int8, l1 : Int8, h2 : Uint16, s2 : Int8, l2 : Int8) {
var template, temp : CEntityTemplate;
//var colEntry : SEntityTemplateColoringEntry;
var col1 : CColorShift;
var col2 : CColorShift;
var ent, npcEntity : CEntity;
var pos : Vector;
var rot : EulerAngles;
var comp : CAppearanceComponent;
pos = thePlayer.GetWorldPosition() + VecConeRand(thePlayer.GetHeading(), 0, 2,2);
rot = thePlayer.GetWorldRotation();
rot.Yaw += 180;
npcEntity = theGame.GetEntityByTag('colshifttestnpc');
npcEntity.Destroy();
//template = (CEntityTemplate)LoadResource( "characters\models\crowd_npc\nml_villager\torso\t1a_04_ma__nml_villager.w2ent", true);
temp = (CEntityTemplate)LoadResource( "dlc/dlcntr/data/entities/baron_edward.w2ent", true);
//colEntry.appearance = 'bob_knight_15';
//colEntry.componentName = 'a_01_mb__bob_knights';
col1.hue = h1;
col1.saturation = s1;
col1.luminance = l1;
col2.hue = h2;
col2.saturation = s2;
col2.luminance = l2;
//colEntry.colorShift1 = col1;
//colEntry.colorShift2 = col2;
if (temp.coloringEntries.Size() <= compN || compN < 0) {
NTR_notify("Wrong! Max" + temp.coloringEntries.Size());
} else {
temp.coloringEntries[compN].colorShift1 = col1;
temp.coloringEntries[compN].colorShift2 = col2;
NTR_notify("Coloring comp [" + temp.coloringEntries[compN].componentName + "]");
}
npcEntity = theGame.CreateEntity( temp, pos, rot);
npcEntity.ApplyAppearance('bob_knight_15');
npcEntity.AddTag('colshifttestnpc');
}
exec function colorEnt(compN : int, h1 : Uint16, s1 : Int8, l1 : Int8, h2 : Uint16, s2 : Int8, l2 : Int8)
{
colorEntCommon(compN, h1, s1, l1, h2, s2, l2);
}
exec function clearColorEnt() {
// for Baron
colorEnt(0, -46, 36, -72, 50, -56, -23)
colorEnt(1, 333, -100, 7, 315, -23, -56)
colorEnt(2, 65, -41, -44, 333, -23, -56)
colorEnt(3, 65, -41, -44, 333, -23, -56)
}*/
exec function getPosRot(tag : name) {
var ent : CEntity;
var pos : Vector;
var rot : EulerAngles;
ent = theGame.GetEntityByTag(tag);
pos = ent.GetWorldPosition();
rot = ent.GetWorldRotation();
NTR_notify("Entity <" + tag + "> pos: [" + pos.X + ", " + pos.Y + ", " + pos.Z + "], rot: [" + rot.Pitch + ", " + rot.Yaw + ", " + rot.Roll + "]");
}
exec function shiftPosRot(tag : name, x, y, z, pitch, yaw, roll : float) {
var ent : CEntity;
var pos : Vector;
var rot : EulerAngles;
ent = theGame.GetEntityByTag(tag);
pos = ent.GetWorldPosition() + Vector(x, y, z);
rot = ent.GetWorldRotation();
rot.Pitch += pitch;
rot.Yaw += yaw;
rot.Roll += roll;
ent.TeleportWithRotation(pos, rot);
}
exec function sc(num : int, optional input : String) {
var scene : CStoryScene;
var entity: CEntity;
var path : String;
var sceneNames : array<String>;
var null: String;
sceneNames.PushBack("00.not_exist.w2scene"); // 0
sceneNames.PushBack("01.intro_hag.w2scene");
sceneNames.PushBack("02.intro_hag_runs.w2scene");
sceneNames.PushBack("03.geralt_oneliners.w2scene");
sceneNames.PushBack("04.triss_appear.w2scene");
sceneNames.PushBack("05.triss_to_monster.w2scene");
sceneNames.PushBack("06.triss_barghests.w2scene");
sceneNames.PushBack("07.gameplay_triss_power.w2scene");
sceneNames.PushBack("18_2.fisherman_oneliners.w2scene"); // 08
sceneNames.PushBack("09.triss_final.w2scene");
sceneNames.PushBack("10.regis_owl_arrive.w2scene");
sceneNames.PushBack("11.orphanage.w2scene");
sceneNames.PushBack("12.fistfight_loose.w2scene");
sceneNames.PushBack("13.gameplay_orphanage.w2scene");
sceneNames.PushBack("14.fistfight_win.w2scene");
sceneNames.PushBack("15.fistfight_repeat.w2scene");
sceneNames.PushBack("16.baron_meeting.w2scene");
sceneNames.PushBack("17.baron_oneliners.w2scene");
sceneNames.PushBack("18.fisherman.w2scene");
sceneNames.PushBack("19.orianna_appear.w2scene");
sceneNames.PushBack("20.orianna_main.w2scene");
sceneNames.PushBack("21.orianna_to_bruxa.w2scene");
sceneNames.PushBack("22.orianna_kills_geralt.w2scene");
sceneNames.PushBack("23.orianna_bruxa_dies.w2scene");
sceneNames.PushBack("24.baron_river_friendly.w2scene");
sceneNames.PushBack("25.baron_dies_long.w2scene");
sceneNames.PushBack("26.baron_river_aggressive.w2scene");
sceneNames.PushBack("27.baron_dies_short.w2scene");
sceneNames.PushBack("28.orianna_farewell.w2scene");
sceneNames.PushBack("29.baron_leaving.w2scene");
sceneNames.PushBack("30.children_corvo_byanko.w2scene");
sceneNames.PushBack("31.ntr_completed.w2scene");
sceneNames.PushBack("32.orianna_oneliners.w2scene");
sceneNames.PushBack("33.orianna_diary.w2scene");
sceneNames.PushBack("25b.baron_dies_long_with_ori.w2scene");
if (input == null) {
input = "Input";
}
//NTR_notify("input = " + input);
path = "dlc/dlcntr/data/scenes/" + sceneNames[num];
// -> SET SCENE PATH
scene = (CStoryScene)LoadResource(path, true);
theGame.GetStorySceneSystem().PlayScene(scene, input);
}
exec function orisc(optional input : String) {
var scene : CStoryScene;
var path : String;
var null: String;
path = "dlc/bob/data/quests/main_quests/quest_files/q704_truth/scenes/q704_05_return_to_diva.w2scene";
// -> SET SCENE PATH
scene = (CStoryScene)LoadResource(path, true);
theGame.GetStorySceneSystem().PlayScene(scene, input);
}
// q704_to_damien_with_regis
// FromBirds, FromRegis, Oneliner
exec function orisc2(optional input : String) {
var scene : CStoryScene;
var path : String;
var null: String;
path = "dlc/bob/data/quests/main_quests/quest_files/q704_truth/scenes/q704_06_regis_info_inject.w2scene";
// -> SET SCENE PATH
scene = (CStoryScene)LoadResource(path, true);
theGame.GetStorySceneSystem().PlayScene(scene, input);
}
exec function resetFact( factID : name ) {
ResetFactQuest( factID );
}
exec function addFact( factID : name, val : int ) {
FactsAdd( factID, val );
}
exec function ulock() {
var actionLocks : array<array< SInputActionLock >>;
var j,i : int;
NTR_notify("TEST!");
actionLocks = thePlayer.GetAllActionLocks();
for (i = 0; i < actionLocks.Size(); i += 1) {
for (j = 0; j < actionLocks[i].Size(); j += 1) {
NTR_notify("lock[" + i + "][" + j + "] = " + actionLocks[i][j].sourceName);
}
}
}
//addAbl(ntr_triss_monster, ntr_mon_orianna_triss, 0)
exec function addAbl( tag : name, abl : name, optional remove : bool ) {
var npc : CNewNPC;
npc = (CNewNPC)theGame.GetNPCByTag(tag);
if ( npc.HasAbility(abl) )
NTR_notify("Has ability: " + abl);
if ( remove )
npc.RemoveAbilityAll(abl);
else
npc.AddAbility(abl);
}
exec function getAttr( tag : name ) {
var npc : CNewNPC;
var abls, attrs : array<name>;
var i : int;
var val : SAbilityAttributeValue;
npc = (CNewNPC)theGame.GetNPCByTag(tag);
npc.GetCharacterStats().GetAbilities(abls);
npc.GetCharacterStats().GetAllAttributesNames(attrs);
if (npc.HasAbility('ntr_mon_orianna_bruxa') || npc.HasAbility('ntr_mon_triss'))
NTR_notify("YEAH IT HAS IT!!!");
for (i = 0; i < abls.Size(); i += 1) {
NTR_notify("Ability: " + abls[i]);
}
for (i = 0; i < attrs.Size(); i += 1) {
if( theGame.params.IsForbiddenAttribute(attrs[i]) )
continue;
val = npc.GetAttributeValue(attrs[i]);
NTR_notify("Attribute: " + attrs[i] + ", value: [base = " + val.valueBase + "], [mult = " + val.valueMultiplicative + "], [add = " + val.valueAdditive + "]");
}
NTR_notify("Max ess: " + npc.GetStatMax(BCS_Essence));
NTR_notify("Cur ess: " + npc.GetStat(BCS_Essence));
NTR_notify("Max vit: " + npc.GetStatMax(BCS_Vitality));
NTR_notify("Cur vit: " + npc.GetStat(BCS_Vitality));
NTR_notify("Immortality: " + npc.GetImmortalityMode());
}
/* 30
[NTR_MOD] Max essence: 15357.599609
[NTR_MOD] Cur essence: 14860.817383
50
[NTR_MOD] Max essence: 25725.601563
[NTR_MOD] Cur essence: 22860.562500
*/
/*[Stats] - [CALCULATED EXP] -
[Stats] - base, without difficulty and -
[Stats] - level difference bonuses -
[Stats] --------------------------------
[Stats] -> for entity :
[Stats] --------------------------------
[Stats] * modDamage : 5380.500488
[Stats] * modArmor : 4000.000000
[Stats] * modVitality : 25722.601563
[Stats] + modOther : 11.000000
[Stats] --------------------------------
[Stats] BASE EXPERIENCE POINTS = [ 40 ]
[Stats] --------------------------------*/
/*quest function oriDebug() {
var npc : CNewNPC;
npc = (CNewNPC)theGame.GetNPCByTag('ntr_orianna_vampire');
if (npc)
NTR_notify("Appearance: <" + npc.GetAppearance() + ">");
else
NTR_notify("NOT FOUND!");
}*/
exec function soundState() {
theSound.EnterGameState( ESGS_Default );
}
exec function soundState2() {
theSound.LeaveGameState( ESGS_DialogNight );
}
exec function soundState4() {
theSound.LeaveGameState( theSound.GetCurrentGameState() );
}
exec function soundState3() {
NTR_notify( theSound.GetCurrentGameState() );
}
/* case ESGS_Default:
return "";
case ESGS_Exploration:
return "exploration";
case ESGS_ExplorationNight:
return "exploration_night";
case ESGS_Focus:
return "focus_exploration";
case ESGS_FocusNight:
return "focus_exploration_night";
case ESGS_Combat:
return "combat";
case ESGS_CombatMonsterHunt:
return "combat_monster_hunt";
case ESGS_Dialog:
return "dialog_scene";
case ESGS_DialogNight:
return "dialog_scene_night";
case ESGS_Cutscene:
return "cutscene";
case ESGS_Minigame:
return "minigames";
case ESGS_Death:
return "death";
case ESGS_Movie:
return "movie";
case ESGS_Boat:
return "boat";
case ESGS_MusicOnly:
return "music_only";
case ESGS_Underwater:
return "underwater";
case ESGS_UnderwaterCombat:
return "underwater_combat";
case ESGS_FocusUnderwater:
return "underwater_focus";
case ESGS_FocusUnderwaterCombat:
return "underwater_combat_focus";
case ESGS_Paused:
return "pause";
case ESGS_Gwent:
return "gwent";
default:
return "";*/
exec function execHide(range : float) {
var acceptedTags : array<name>;
var acceptedVoicetags : array<name>;
var killIfHostile : bool;
killIfHostile = true;
acceptedTags.PushBack('PLAYER');
//acceptedTags.PushBack('ntr_fisherman');
acceptedVoicetags.PushBack('CELINA MONSTER');
NTR_HideActorsInRange(range, acceptedTags, acceptedVoicetags, killIfHostile);
}
exec function execUnhide(range : float) {
NTR_UnhideActorsInRange(range);
}
exec function getInRange(range : float, optional makeFriendly : int) {
var entities: array<CGameplayEntity>;
var actor : CActor;
var i, t, maxEntities: int;
var tags : array<name>;
var pos : Vector;
maxEntities = 1000;
FindGameplayEntitiesInRange(entities, thePlayer, range, maxEntities);
pos = thePlayer.GetWorldPosition();
LogChannel('getInRange', "player pos: [" + pos.X + ", " + pos.Y + ", " + pos.Z + "]");
for (i = 0; i < entities.Size(); i += 1) {
LogChannel('getInRange', "entity: " + entities[i]);
tags = entities[i].GetTags();
for (t = 0; t < tags.Size(); t += 1) {
LogChannel('getInRange', " > tag " + tags[t]);
}
actor = (CActor)entities[i];
if (actor) {
if (!actor.IsAlive()) {
LogChannel('getInRange', "* actor dead");
continue;
}
if (actor.HasAttitudeTowards(thePlayer)) {
LogChannel('getInRange', "* GetAttitude to player: " + actor.GetAttitude(thePlayer));
}
LogChannel('getInRange', "* GetAttitudeGroup: " + actor.GetAttitudeGroup());
LogChannel('getInRange', "* GetVoicetag: " + actor.GetVoicetag());
LogChannel('getInRange', "* GetDisplayName: " + actor.GetDisplayName());
if (makeFriendly == 1)
actor.SetTemporaryAttitudeGroup( 'friendly_to_player', AGP_Default );
if (makeFriendly == 2 && ((actor.HasAttitudeTowards(thePlayer) && actor.GetAttitude(thePlayer) == AIA_Hostile) || actor.GetAttitudeGroup() == 'AG_nightwraith' || actor.GetAttitudeGroup() == 'hostile_to_player')) {
LogChannel('HideInRange', " x KILL");
actor.OnCutsceneDeath();
}
if (makeFriendly == 3)
actor.OnCutsceneDeath();
}
}
}
exec function scentGet() {
var focusModeController : CFocusModeController;
var i : int;
focusModeController = theGame.GetFocusModeController();
if ( focusModeController ) {
for (i = 0; i < focusModeController.detectedCluesTags.Size(); i += 1) {
NTR_notify("scent[" + i + " = " + focusModeController.detectedCluesTags[i]);
}
}
NTR_notify("scentGet !");
}
exec function scentOn1() {
//FocusEffect( FEAA_Enable, 'focus_smell', 'ntr_orianna_scent1', -1 );
//FocusEffect( FEAA_Enable, 'focus_smell', 'ntr_orianna_scent2', -1 );
//FocusEffect( FEAA_Enable, 'focus_smell', 'ntr_orianna_scent3', -1 );
//FocusEffect( FEAA_Enable, 'focus_smell', 'ntr_orianna_scent4', -1 );
//FocusEffect( FEAA_Enable, 'focus_smell', 'ntr_orianna_scent5', -1 );
FocusEffect( FEAA_Enable, 'focus_smell', 'ntr_orianna_scents', -1 );
NTR_notify("scentON1 !");
}
exec function scentOn11() {
FocusEffect( FEAA_Enable, 'focus_smell', 'ntr_orianna_scent1', -1 );
//FocusEffect( FEAA_Enable, 'focus_smell', 'ntr_orianna_scent2', -1 );
//FocusEffect( FEAA_Enable, 'focus_smell', 'ntr_orianna_scent3', -1 );
//FocusEffect( FEAA_Enable, 'focus_smell', 'ntr_orianna_scent4', -1 );
//FocusEffect( FEAA_Enable, 'focus_smell', 'ntr_orianna_scent5', -1 );
NTR_notify("scentON1 !");
}
exec function scentOn2() {
FocusEffect( FEAA_Enable, 'focus_smell', 'ntr_orianna_scent1', -1 );
FocusEffect( FEAA_Enable, 'focus_smell', 'ntr_orianna_scent2', -1 );
FocusEffect( FEAA_Enable, 'focus_smell', 'ntr_orianna_scent3', -1 );
FocusEffect( FEAA_Enable, 'focus_smell', 'ntr_orianna_scent4', -1 );
FocusEffect( FEAA_Enable, 'focus_smell', 'ntr_orianna_scent5', -1 );
NTR_notify("scentON2 !");
}
/*exec function enableScent(enable : bool) {
var scent : CCustomScent;
var points : array<Vector>;
scent = (CCustomScent) theGame.GetEntityByTag('ntr_orianna_scents');
points.PushBack( Vector(-410.2420349121, -1439.0350341797, 87.9959182739) );
points.PushBack( Vector(-407.3211975098, -1441.0976562500, 88.1598815918) );
points.PushBack( Vector(-406.3743591309, -1443.0831298828, 88.1598815918) );
scent.setScentPoints(points);
scent.setScentEnabled(enable);
}
exec function scentDist(dist : float) {
var scent : CCustomScent;
scent = (CCustomScent) theGame.GetEntityByTag('ntr_orianna_scent_l');
scent.setScentDistance(dist);
}*/
exec function GiveReward( rewardName : name ) : void
{
theGame.GiveReward( rewardName, thePlayer );
}
function NTR_additem(itemName : name, optional count : int, optional equip : bool)
{
var ids : array<SItemUniqueId>;
var i : int;
if(IsNameValid(itemName))
{
ids = thePlayer.inv.AddAnItem(itemName, count);
if(thePlayer.inv.IsItemSingletonItem(ids[0]))
{
for(i=0; i<ids.Size(); i+=1)
thePlayer.inv.SingletonItemSetAmmo(ids[i], thePlayer.inv.SingletonItemGetMaxAmmo(ids[i]));
}
if(ids.Size() == 0)
{
LogItems("exec function additem: failed to add item <<" + itemName + ">>, most likely wrong item name");
return;
}
if(equip)
thePlayer.EquipItem(ids[0]);
}
else
{
LogItems("exec function additem: Invalid item name <<"+itemName+">>, cannot add");
}
}
exec function getAcero() {
NTR_additem('ntr_acero_sword_pc', 1, true);
}
exec function getItem(itemName : name) {
NTR_additem(itemName, 1, true);
}
exec function getExoticSilver() {
NTR_additem('stiletto_silver', 1, false);
NTR_additem('hachyar', 1, false);
NTR_additem('sickle_silver', 1, false);
NTR_additem('machete_silver', 1, false);
NTR_additem('silver', 1, false);
NTR_additem('roh', 1, false);
NTR_additem('talon', 1, false);
NTR_additem('sabre', 1, false);
NTR_additem('serrator', 1, false);
NTR_additem('soul', 1, false);
NTR_additem('kama_silver', 1, false);
NTR_additem('naginata_silver', 1, false);
NTR_additem('glaive_silver', 1, false);
NTR_additem('crescent_silver', 1, false);
NTR_additem('luani', 1, false);
NTR_additem('rapier_silver', 1, false);
NTR_additem('hjaven', 1, false);
NTR_additem('maltonge', 1, false);
NTR_additem('skinner', 1, false);
NTR_additem('rachis', 1, false);
NTR_additem('dagger1_silver', 1, false);
NTR_additem('dagger2_silver', 1, false);
NTR_additem('dagger3_silver', 1, false);
NTR_additem('shortsword1_silver', 1, false);
NTR_additem('shortsword2_silver', 1, false);
NTR_additem('shortsword3_silver', 1, false);
NTR_additem('greatsword1_silver', 1, false);
NTR_additem('greatsword2_silver', 1, false);
NTR_additem('greatsword3_silver', 1, false);
}
exec function getExoticSteel() {
NTR_additem('stiletto', 1, false);
NTR_additem('meat', 1, false);
NTR_additem('cleaver', 1, false);
NTR_additem('sickle', 1, false);
NTR_additem('machete', 1, false);
NTR_additem('bajinn', 1, false);
NTR_additem('roh', 1, false);
NTR_additem('claw', 1, false);
NTR_additem('sabre', 1, false);
NTR_additem('jaggat', 1, false);
NTR_additem('spirit', 1, false);
NTR_additem('kama', 1, false);
NTR_additem('naginata', 1, false);
NTR_additem('glaive', 1, false);
NTR_additem('crescent', 1, false);
NTR_additem('chakram', 1, false);
NTR_additem('rapier', 1, false);
NTR_additem('venasolak', 1, false);
NTR_additem('orkur', 1, false);
NTR_additem('wrisp', 1, false);
NTR_additem('spinner', 1, false);
NTR_additem('dagger1', 1, false);
NTR_additem('dagger2', 1, false);
NTR_additem('dagger3', 1, false);
NTR_additem('shortsword1', 1, false);
NTR_additem('shortsword2', 1, false);
NTR_additem('shortsword3', 1, false);
NTR_additem('greatsword1', 1, false);
NTR_additem('greatsword2', 1, false);
NTR_additem('greatsword3', 1, false);
}
exec function timeScale(timeScale : float) {
SetTimeScaleQuest(timeScale);
}
exec function animScale(entityTag : name, timeScale : float) {
var npc : CNewNPC;
var slowdownCauserId : int;
npc = (CNewNPC)theGame.GetNPCByTag(entityTag);
if (timeScale != -1) {
/*if (FactsQuerySum("ntr_animscale_id") != 0) {
NTR_notify("ERROR! animScale already active!");
return;
}*/
slowdownCauserId = npc.SetAnimationSpeedMultiplier( timeScale );
FactsAdd("ntr_animscale_id", slowdownCauserId);
NTR_notify("OK! slowdownCauserId = " + slowdownCauserId);
} else {
slowdownCauserId = FactsQuerySum("ntr_animscale_id");
npc.ResetAnimationSpeedMultiplier(slowdownCauserId);
NTR_notify("OK! Reset slowdownCauserId = " + slowdownCauserId);
FactsSet("ntr_animscale_id", 0);
}
}
exec function orianaDoor(newState : string, optional smoooth : bool, optional dontBlockInCombat : bool ) {
NTR_DoorChangeState('q704_oriana_feeding_room', newState, , , smoooth, dontBlockInCombat);
}
exec function orianaDoor2(newState : string, optional smoooth : bool, optional dontBlockInCombat : bool ) {
NTR_DoorChangeState('ntr_orianna_house_front_door', newState, , , smoooth, dontBlockInCombat);
}
exec function orianaDoor3(newState : string, optional smoooth : bool, optional dontBlockInCombat : bool ) {
NTR_DoorChangeState('ntr_orianna_house_back_door', newState, , , smoooth, dontBlockInCombat);
}
exec function corvoDoor(newState : string, optional smoooth : bool, optional dontBlockInCombat : bool ) {
NTR_DoorChangeState('mq7024_corvo_bianco_main_door', newState, , , smoooth, dontBlockInCombat);
}
exec function myspawn(path : string) {
var template : CEntityTemplate;
var pos : Vector;
var ent : CEntity;
template = (CEntityTemplate)LoadResource(path, true);
pos = thePlayer.GetWorldPosition() + VecRingRand(1.f,2.f);
pos.Z += 1.0;
ent = (CEntity)theGame.CreateEntity(template, pos);
ent.AddTag('oriana_dress_test');
}
exec function morphOriana( morphRatio : float, blendTime : float ) {
var npc : CNewNPC;
var manager : CMorphedMeshManagerComponent;
npc = (CNewNPC)theGame.GetNPCByTag('oriana_test2');
if (npc) {
//manager = (CMorphedMeshManagerComponent)npc.GetComponentByClassName('CMorphedMeshManagerComponent');
manager = (CMorphedMeshManagerComponent)npc.GetComponent('face_morph');
if(manager) {
manager.SetMorphBlend( morphRatio, blendTime );
} else {
theGame.GetGuiManager().ShowNotification("Morph component not found!");
}
} else {
theGame.GetGuiManager().ShowNotification("Entity [OrianaTest] not found!");
}
}
exec function triss1() {
var template : CEntityTemplate;
var pos : Vector;
var ent : CEntity;
template = (CEntityTemplate)LoadResource("characters/npc_entities/main_npc/triss.w2ent", true);
pos = thePlayer.GetWorldPosition() + VecRingRand(1.f,2.f);
ent = (CEntity)theGame.CreateEntity(template, pos);
//ent.AddTag('oriana_test2');
//ent.ApplyAppearance('orianna_vampire');
}
exec function triss2() {
var template : CEntityTemplate;
var pos : Vector;
var ent : CEntity;
template = (CEntityTemplate)LoadResource("quests/main_npcs/triss.w2ent", true);
pos = thePlayer.GetWorldPosition() + VecRingRand(1.f,2.f);
ent = (CEntity)theGame.CreateEntity(template, pos);
ent.AddTag('vip');
//ent.ApplyAppearance('orianna_vampire');
}
exec function triss3() {
var template : CEntityTemplate;
var pos : Vector;
var ent : CEntity;
template = (CEntityTemplate)LoadResource("dlc/bob/data/quests/main_quests/quest_files/q705_epilog/characters/triss.w2ent", true);
pos = thePlayer.GetWorldPosition() + VecRingRand(1.f,2.f);
ent = (CEntity)theGame.CreateEntity(template, pos);
//ent.AddTag('oriana_test2');
//ent.ApplyAppearance('orianna_vampire');
}
exec function triss4() {
var template : CEntityTemplate;
var pos : Vector;
var ent : CEntity;
template = (CEntityTemplate)LoadResource("dlc/bob/data/characters/npc_entities/main_npc/triss.w2ent", true);
pos = thePlayer.GetWorldPosition() + VecRingRand(1.f,2.f);
ent = (CEntity)theGame.CreateEntity(template, pos);
//ent.AddTag('oriana_test2');
//ent.ApplyAppearance('orianna_vampire');
}
exec function oridet() {
var template : CEntityTemplate;
var pos : Vector;
var ent : CEntity;
template = (CEntityTemplate)LoadResource("dlc/dlcntr/data/entities/orianna_vampire.w2ent", true);
pos = thePlayer.GetWorldPosition() + VecRingRand(1.f,2.f);
ent = (CEntity)theGame.CreateEntity(template, pos);
ent.AddTag('oriana_test2');
ent.AddTag('ntr_orianna_vampire');
ent.AddTag('vip');
ent.ApplyAppearance('orianna_human_morph');
}
exec function oridet2() {
var template : CEntityTemplate;
var pos : Vector;
var ent : CEntity;
var act : CActor;
template = (CEntityTemplate)LoadResource("dlc/dlcntr/data/entities/orianna_vampire.w2ent", true);
pos = thePlayer.GetWorldPosition() + VecRingRand(1.f,2.f);
ent = (CEntity)theGame.CreateEntity(template, pos);
act = (CActor) ent;
ent.AddTag('oriana_test2');
ent.AddTag('ntr_orianna_vampire');
ent.AddTag('vip');
ent.ApplyAppearance('orianna_vampire');
act.SetTemporaryAttitudeGroup( 'hostile_to_player', AGP_Default );
act.SetAttitude( thePlayer, AIA_Hostile );
thePlayer.SetAttitude( act, AIA_Hostile );
}
exec function orihum() {
var template : CEntityTemplate;
var pos : Vector;
var ent : CEntity;
template = (CEntityTemplate)LoadResource("dlc/dlcntr/data/entities/orianna_human.w2ent", true);
pos = thePlayer.GetWorldPosition() + VecRingRand(1.f,2.f);
ent = (CEntity)theGame.CreateEntity(template, pos);
ent.AddTag('oriana_test2');
ent.AddTag('ntr_orianna_human');
ent.AddTag('vip');
ent.ApplyAppearance('orianna_human_morph');
}
exec function orihum2() {
var template : CEntityTemplate;
var pos : Vector;
var ent : CEntity;
template = (CEntityTemplate)LoadResource("dlc/dlcntr/data/entities/orianna_human.w2ent", true);
pos = thePlayer.GetWorldPosition() + VecRingRand(1.f,2.f);
ent = (CEntity)theGame.CreateEntity(template, pos);
ent.AddTag('oriana_test2');
ent.AddTag('ntr_orianna_human');
ent.AddTag('vip');
ent.ApplyAppearance('orianna_vampire_bloody_morph');
}
exec function barolg() {
var template : CEntityTemplate;
var pos : Vector;
var ent : CEntity;
var act : CActor;
template = (CEntityTemplate)LoadResource("dlc/dlcntr/data/entities/baron_edward.w2ent", true);
pos = thePlayer.GetWorldPosition() + VecRingRand(1.f,2.f);
ent = (CEntity)theGame.CreateEntity(template, pos);
act = (CActor) ent;
act.AddTag('baron_test2');
act.AddTag('ntr_baron_edward');
act.AddTag('ntr_crossbow_bandit');
act.AddTag('vip');
act.ApplyAppearance('bob_knight_15');
act.SetTemporaryAttitudeGroup( 'friendly_to_player', AGP_Default );
act.SetAttitude( thePlayer, AIA_Hostile );
thePlayer.SetAttitude( act, AIA_Hostile );
//NTR_TuneNPC( 'baron_test2', GetWitcherPlayer().GetLevel(), "Hostile", "None", false, "ENGT_Quest", -1 );
}
exec function trissmonster() {
var template : CEntityTemplate;
var pos : Vector;
var ent : CEntity;
var act : CActor;
template = (CEntityTemplate)LoadResource("dlc/dlcntr/data/entities/triss_monster.w2ent", true);
pos = thePlayer.GetWorldPosition() + VecRingRand(1.f,2.f);
ent = (CEntity)theGame.CreateEntity(template, pos);
act = (CActor) ent;
act.AddTag('ntr_test');
act.AddTag('vip');
act.SetTemporaryAttitudeGroup( 'hostile_to_player', AGP_Default );
act.SetAttitude( thePlayer, AIA_Hostile );
thePlayer.SetAttitude( act, AIA_Hostile );
//NTR_TuneNPC( 'baron_test2', GetWitcherPlayer().GetLevel(), "Hostile", "None", false, "ENGT_Quest", -1 );
}
exec function barolg2() {
var template : CEntityTemplate;
var pos : Vector;
var ent : CEntity;
template = (CEntityTemplate)LoadResource("dlc/dlcntr/data/entities/baron_edward.w2ent", true);
pos = thePlayer.GetWorldPosition() + VecRingRand(1.f,2.f);
ent = (CEntity)theGame.CreateEntity(template, pos);
ent.AddTag('baron_test2');
ent.AddTag('ntr_baron_edward');
ent.AddTag('vip');
//ent.ApplyAppearance('bob_knight_15');
NTR_TuneNPC( 'baron_test2', 50, "Hostile", "None", false, "ENGT_Quest", -1 );
}
exec function barolg3() {
var template : CEntityTemplate;
var pos : Vector;
var ent : CEntity;
template = (CEntityTemplate)LoadResource("dlc\ep1\data\quests\main_npcs\olgierd.w2ent", true);
pos = thePlayer.GetWorldPosition() + VecRingRand(1.f,2.f);
ent = (CEntity)theGame.CreateEntity(template, pos);
ent.AddTag('baron_test1');
//ent.ApplyAppearance('bob_knight_15');
NTR_TuneNPC( 'baron_test1', GetWitcherPlayer().GetLevel(), "Hostile", "None", false, "ENGT_Quest", -1 );
}
exec function barolg6() {
var template : CEntityTemplate;
var pos : Vector;
var ent : CEntity;
template = (CEntityTemplate)LoadResource("dlc\bob\data\quests\secondary_npcs\damien.w2ent", true);
pos = thePlayer.GetWorldPosition() + VecRingRand(1.f,2.f);
ent = (CEntity)theGame.CreateEntity(template, pos);
ent.AddTag('baron_test6');
//ent.ApplyAppearance('bob_knight_15');
NTR_TuneNPC( 'baron_test6', GetWitcherPlayer().GetLevel(), "Hostile", "None", false, "ENGT_Quest", -1 );
}
exec function createAtt(id : int) {
NTR_CreateAttachment_Q( id );
}
exec function removeAtt(id : int) {
NTR_RemoveAttachment_Q( id );
}
exec function oridress() {
var template : CEntityTemplate;
var pos : Vector;
var ent : CEntity;
template = (CEntityTemplate)LoadResource("dlc/dlcntr/data/entities/oriana_dress/orianna_dress_lying.w2ent", true);
pos = thePlayer.GetWorldPosition() + VecRingRand(1.f,2.f);
pos.Z += 1.0;
ent = (CEntity)theGame.CreateEntity(template, pos);
ent.AddTag('oriana_dress_test');
}
exec function testnpc() {
var npc : CNewNPC;
npc = (CNewNPC)theGame.GetNPCByTag('oriana_test2');
theGame.GetGuiManager().ShowNotification("appearance: " + npc.GetAppearance() + ", alive: " + npc.IsAlive());
}
exec function testLogo() {
var template : CEntityTemplate;
var pos : Vector;
var ent : CEntity;
template = (CEntityTemplate)LoadResource("dlc/dlcntr/data/entities/ntr_logo_entity.w2ent", true);
pos = thePlayer.GetWorldPosition() + VecRingRand(1.f,2.f);
ent = (CEntity)theGame.CreateEntity(template, pos);
ent.AddTag('ntr_logo_test');
}
exec function switchLogo(enable : bool) {
var ent : CEntity;
ent = theGame.GetEntityByTag('ntr_logo_test');
if (enable)
ent.PlayEffect('ntr_logo_screen_en');
else
ent.StopEffect('ntr_logo_screen_en');
}
exec function switchLogo2(enable : bool) {
var ent : CEntity;
ent = theGame.GetEntityByTag('ntr_logo_test');
if (enable)
ent.PlayEffect('ntr_logo_screen_en_baw');
else
ent.StopEffect('ntr_logo_screen_en_baw');
}
// playScene(dlc/bob/data/quests/main_quests/quest_files/q704_truth/scenes/q704_05_return_to_diva.w2scene)
exec function playScene(path : string, optional input : string) {
var scene : CStoryScene;
if (!input) {
input = "Input";
}
// -> SET SCENE PATH
scene = (CStoryScene)LoadResource( path, true);
theGame.GetStorySceneSystem().PlayScene(scene, input);
}
exec function oribru() {
var template : CEntityTemplate;
var pos : Vector;
var ent : CEntity;
template = (CEntityTemplate)LoadResource("dlc/dlcntr/data/entities/orianna_bruxa.w2ent", true);
pos = thePlayer.GetWorldPosition() + VecRingRand(1.f,2.f);
ent = (CEntity)theGame.CreateEntity(template, pos);
ent.AddTag('oriana_test2');
ent.AddTag('ntr_orianna_bruxa');
ent.ApplyAppearance('bruxa_monster_gameplay');
NTR_TuneNPC( 'oriana_test2', GetWitcherPlayer().GetLevel(), "Neutral", "None", false, "ENGT_Quest", -1 );
}
exec function oribru2() {