Jump to content

More Questions


CoM_Solaufein

Recommended Posts

Hotkey fixer is something to fix strings if something gets a bit scrambled.

 

Example:

IF 
HotKey(K)  
THEN 
RESPONSE #100	   
	SetName(~Gavin~) 
	SetPlayerSound(Myself,~Um, regroup?~ [BGAV_01],MORALE) 
	SetPlayerSound(Myself,~The gods will smile on our actions. We are surely on the right path.~ [BGAV_02],HAPPY) 
	SetPlayerSound(Myself,~We must do better.~ [BGAV_03],UNHAPPY_ANNOYED) 
	SetPlayerSound(Myself,~We cannot go on like this! I cannot condone our actions.~ [BGAV_04],UNHAPPY_SERIOUS) 
	SetPlayerSound(Myself,~This must end. I can no longer be party to such deeds.~ [BGAV_05],UNHAPPY_BREAKING_POINT)
	SetPlayerSound(Myself,~Remember, you asked for this.~ [BGAV_06],LEADER)
	SetPlayerSound(Myself,~I need to rest. I'm no good to anyone like this.~ [BGAV_07],TIRED) 
	SetPlayerSound(Myself,~If we're going to stand around and look at the scenery, I'm going to get out my sketchbook.~ [BGAV_08],BORED) 
	SetPlayerSound(Myself,~In Lathander's name!~ [BGAV_09],BATTLE_CRY1) 
	SetPlayerSound(Myself,~By all that is good, I will crush you!~ [BGAV_10],BATTLE_CRY2) 
	SetPlayerSound(Myself,~To battle!~ [BGAV_11],BATTLE_CRY3) 
	SetPlayerSound(Myself,~Fall before the might of Lathander!~ [BGAV_12],BATTLE_CRY4) 
	SetPlayerSound(Myself,~Hey, I felt that!~ [BGAV_13],DAMAGE) 
	SetPlayerSound(Myself,~It's as good a time as any.~ [BGAV_14],DYING) 
	SetPlayerSound(Myself,~This healer needs some help, here!~ [BGAV_15],HURT) 
	SetPlayerSound(Myself,~All this fresh air really makes me feel alive.~ [BGAV_16],AREA_FOREST) 
	SetPlayerSound(Myself,~So many opportunities to help, but so many people who need it.~ [BGAV_17],AREA_CITY) 
	SetPlayerSound(Myself,~There's nothing between me and the open sky but a lot of rock and dirt.~ [BGAV_18],AREA_DUNGEON) 
	SetPlayerSound(Myself,~Daylight! Behold the majesty of Lathander!~ [BGAV_19],AREA_DAY) 
	SetPlayerSound(Myself,~At night, the world rests and is renewed.~ [BGAV_20],AREA_NIGHT) 
	SetPlayerSound(Myself,~Your wish?~ [BGAV_21],SELECT_COMMON1) 
	SetPlayerSound(Myself,~Yes?~ [BGAV_22],SELECT_COMMON2) 
	SetPlayerSound(Myself,~Hmm?~ [BGAV_23],SELECT_COMMON3) 
	SetPlayerSound(Myself,~How may I help you?~ [BGAV_24],SELECT_COMMON4) 
	SetPlayerSound(Myself,~Your request?~ [BGAV_25],SELECT_COMMON5) 
	SetPlayerSound(Myself,~What was it that you wanted?~ [BGAV_26],SELECT_COMMON6) 
	SetPlayerSound(Myself,~As you wish.~ [BGAV_27],SELECT_ACTION1) 
	SetPlayerSound(Myself,~I will do as you say.~ [BGAV_28],SELECT_ACTION2) 
	SetPlayerSound(Myself,~At your command.~ [BGAV_29],SELECT_ACTION3) 
	SetPlayerSound(Myself,~All right.~ [BGAV_30],SELECT_ACTION4) 
	SetPlayerSound(Myself,~Yes.~ [BGAV_31],SELECT_ACTION5) 
	SetPlayerSound(Myself,~As you see fit.~ [BGAV_32],SELECT_ACTION6) 
	SetPlayerSound(Myself,~Consider it done.~ [BGAV_33],SELECT_ACTION7) 
	SetPlayerSound(Myself,~As long as it doesn't involve spiders.~ [BGAV_34],SELECT_RARE1) 
	SetPlayerSound(Myself,~Is this really necessary?~ [BGAV_35],SELECT_RARE2) 
	SetPlayerSound(Myself,~One for Lathander!~ [BGAV_36],CRITICAL_HIT) 
	SetPlayerSound(Myself,~Damn my clumsiness!~ [BGAV_37],CRITICAL_MISS) 
	SetPlayerSound(Myself,~Sorry, but there's no room for anything else.~ [BGAV_39],INVENTORY_FULL) 
	SetPlayerSound(Myself,~Was that really necessary?~ [BGAV_40],PICKED_POCKET) 
	SetPlayerSound(Myself,~I am hidden.~ [BGAV_41],HIDDEN_IN_SHADOWS) 
	SetPlayerSound(Myself,~Stop that! You've broken my concentration.~ [BGAV_42],SPELL_DISRUPTED) 
	SetPlayerSound(Myself,~Let's hope this gets the right target, shall we?~ [BGAV_43],SET_A_TRAP) 
END

 

RealSetGlobalTimer() uses real time (in seconds), not game time. It will probably still show up looking screwed up if you look at the script with NI after it compiles, but that's just the usual NI misinterpretation and nothing to worry about. RealSetGlobalTimer("MyTimer","GLOBAL",300) will still expire in 5 minutes real time, no matter what NI says.

Link to comment
It will probably still show up looking screwed up if you look at the script with NI after it compiles, but that's just the usual NI misinterpretation and nothing to worry about. RealSetGlobalTimer("MyTimer","GLOBAL",300) will still expire in 5 minutes real time, no matter what NI says.
If you mean "300" transforming into "ONE_HOUR" then it's due to IDS, which is usually using descriptions in accordance with in-game timing. The "300"might as well be labeled as THREE_HUNDRED_SECONDS_OF_REAL_TIME_OR_ONE_HOUR_OF_INGAME_PLAYTIME
Link to comment

We do what the IDS tells us IIRC. If it decompiles to a game time symbol for you, it's because your Action.ids says this parameter uses symbols from that IDS, not because it's our "usual misinterpretation."

Link to comment

<HESHE> will use the pronoun appropriate to the person the NPC is speaking to. <PRO_HESHE> will use the pronoun appropriate to Player1.

 

If the male protagonist is a squishy mage, the player may put Jaheira in the first party slot. If the player then clicks on your NPC, if you use <HESHE>, the NPC will refer to Jaheira as she. If you use <PRO_HESHE>, the NPC would refer to her as he.

Link to comment

Okay now I'm moving on to more complicated scripting. I have five tests for the character to take on and finish. Each of these tests takes place in a separate area and when they finish they return to the home area where they started from. There's a guide who I want to greet the party once they finish the quest to help them along for the next test.

 

So lets say encounter A is done and the group returns to the home area. I want to guide to go to the entrance of the area where encounter A started from. Now they get the low down for encounter B, so the party goes to the exit for encounter B. Once they finish encounter they return and I want the guide to be at the doorway of encounter B when they return.

 

I know this has something to do with having the creature move or walk to a certain point in the area. I just don't know how to set it up.

Link to comment

MoveToPoint() works, but the CRE has to walk the whole way. If you want the NPC to be standing there as soon as the party enters the area, you are better off putting something like the following in the area script.

 

IF

Global("TestADone","GLOBAL",1)

Exists(Player1)

THEN

RESPONSE #100

ActionOverride("questgvr",JumpToPoint([x.y]))

SetGlobal("TestADone","GLOBAL",2)

END

Link to comment

For the sake of keeping your code modular and manageable, you could consider having each version of the quest-giver be a separate CRE file. In that case, you get the area file to create the creature when and where you need them, and give each incarnation a script telling it to destroy itself if its bit of the quest has been done.

Link to comment

If you did it that way, you'd also want to make sure the alternative CREs DestroySelf()ed if another incarnation had been killed (and/or make them unkillable).

 

MoveToPoint/JumpToPoint only work in the same area IIRC. If you're actually moving between separate areas, you'll need EscapeAreaMove() or MoveBetweenAreas() to move the CRE between different areas (unless you go with destroying and recreating the CREs).

Link to comment

Thanks. I'll go with the different creature files with each greeting.

 

From a scripting point of view is it better to have the CreateCreature() scripts at the bottom or the top?

 

 

IF
OnCreation()
Global("Reveal7400","CM7400",0)
THEN
RESPONSE #100
 SetGlobal("Reveal7400","CM7400",1)
 Explore()
 Continue()
END
IF
Global("CmEncounterYQuests","GLOBAL",0)
THEN
RESPONSE #100
 TriggerActivation("Tran7300",FALSE)
		    TriggerActivation("Tran7402",FALSE)
 TriggerActivation("Tran7403",FALSE)
 TriggerActivation("Tran7404",FALSE)
 TriggerActivation("Tran7405",FALSE)
 TriggerActivation("Tran7500",FALSE)
 Continue()
END
IF
Global("CmEncounterYQuests","GLOBAL",1)
THEN
RESPONSE #100
 TriggerActivation("Tran7402",TRUE)
 Continue()
END
IF
Global("CmEncounterYQuests","GLOBAL",2)
THEN
RESPONSE #100
 TriggerActivation("Tran7403",TRUE)
 Continue()
END
IF
Global("CmEncounterYQuests","GLOBAL",3)
THEN
RESPONSE #100
 TriggerActivation("Tran7404",TRUE)
 Continue()
END
IF
Global("CmEncounterYQuests","GLOBAL",4)
THEN
RESPONSE #100
 TriggerActivation("Tran7405",TRUE)
 Continue()
END
IF
Global("CmEncounterYQuests","GLOBAL",5)
THEN
RESPONSE #100
 TriggerActivation("Tran7500",TRUE)
 Continue()
END
IF
Dead("cmdeath1")
THEN
RESPONSE #100
 CreateCreature("CM7400G1",[580.845],11)
END
IF
Dead("cmdeath2")
THEN
RESPONSE #100
 CreateCreature("CM7400G2",[484.1554],9)
END
IF
Dead("cmdeath3")
THEN
RESPONSE #100
 CreateCreature("CM7400G3",[1631.2534],9)
END
IF
Dead("cmdeath4")
THEN
RESPONSE #100
 CreateCreature("CM7400G4",[3595.1020],3)
END
IF
Dead("cmdeath5")
THEN
RESPONSE #100
 SetGlobal("CmEncounterYQuestsComplete","GLOBAL",1)
END
IF
Global("CmEncounterYQuestsComplete","GLOBAL",1)
    Global("CmxxEndGame","CM7400",0)
THEN
RESPONSE #100
 SetGlobal("CmxxEndGame","CM7400",1)
 CreateCreature("CMxx",[1992.930],0)
 CreateCreature("CM7400S3",[1946.854],3)
 CreateCreature("CM7400S3",[1848.961],4)
 CreateCreature("CM7400S2",[1927.830],2)
 CreateCreature("CM7400S2",[1876.966],10)
 CreateCreature("CM7400S2",[1600.722],0)
 CreateCreature("CM7400S2",[1447.471],12)
 CreateCreature("CM7400S1",[1936.845],4)
 CreateCreature("CM7400S1",[1816.959],2)
 CreateCreature("CM7400S1",[1725.723],8)
END
IF
Dead("cmxx") // xxl
THEN
RESPONSE #100
 SetGlobal("CmEncounterYQuests","GLOBAL",5)
END

Link to comment

The script you have there is fine as far as I can tell.

 

Usually if it is a custom script the CreateCreature actions can come anywhere that you deem necessary so long as everything can take place when it needs to take place.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...