CamDawg Posted October 30, 2014 Posted October 30, 2014 Again, some of these were added prior. 308 AddMapNoteColor(P:Position*,I:StringRef*,I:Color*Mapnotes)This action will add a map marker of the specified color (taken from MAPNOTES.IDS) to the specified position named as per the specified string.Sample use: AddMapNoteColor([2010.644],40087,GREEN)) will add a green map marker at coordinates x=2010 y=644 named "Umber Hulk Tunnels". 352 SetAreaScript(S:Script*,I:ScriptSlot)This action changes the script specified by the scriptslot parameter to the script specified by the script parameter, for the current area. Area script slots are: 0 = DEFAULT, 1 = GENERAL, 2 = RACE, 3 = CLASS, 4 = OVERRIDE. Values higher than 5 will set the DEFAULT script.Sample use: SetAreaScript("ohbare2",0) will set ohbare2.bcs as the default script for the current area. 353 AdvanceTime(I:Time*GTIMES)This action advances the game-time by the amount specified by the Time parameter in seconds.Sample use: AdvanceTime(300) will advance the game time by 1 hour. 354 RunAwayFromNoInterruptNoLeaveArea(O:Creature*,I:Time*)This action causes the active creature to run away from the specified creature, for the specified time, without leaving the current area. This action cannot be interrupted by other actions. The time parameter is measured in AI updates, which default to 15 updates per second.Sample use: RunAwayFromNoInterruptNoLeaveArea(NearestEnemyOf(Myself),90) will make the active creature run away from the nearest enemy for 6 seconds. 355 RunAwayFromNoLeaveArea(O:Creature*,I:Time*)This action causes the active creature to run away from the specified creature, for the specified time, without leaving the current area. This action can be interrupted by other actions. The time parameter is measured in AI updates, which default to 15 updates per second.Sample use: RunAwayFromNoLeaveArea(NearestEnemyOf(Myself),90) will make the active creature run away from the nearest enemy for 6 seconds. 356 TransformItem(S:OldItem*,S:NewItem*)This action changes the item specified by the OldItem parameter into the item specified by the NewItem parameter, retaining the charges/flags of OldItem.Sample use: TransformItem("WAND02","WAND04") will transform the Wand of Fear into a Wand of Paralyzation while retaining the existing number of charges. 357 ForceRandomEncounter(S:Area*)This action will force the party into the selected area on their next worldmap travel. Only one ForceRandomEncounter can be in play at a time so subsequent use will clear the previous one. It will also be cleared once the party arrives in the designated area.Sample use: ForceRandomEncounter("OH6010") force the party into OH6010 on their next worldmap travel attempt. 358 JumpToObject(O:Target*)This action teleports the active creature to the object specified by the Target parameter.Sample use: JumpToObject(Player1) will teleport the active creature to Player1. 359 SetMusic(I:Slot*MUSIC,I:Song*SONGLIST)This action will fill the relevant music slot (taken from MUSIC.IDS) of the current area with the specified music track (taken from SONGLIST.IDS).Sample use: SetMusic(DAY,OH4000) will set the day song of the current area to OH4000.MUS. 360 ChangeStoreMarkup(S:Store*,I:BuyMarkup*,I:SellMarkup*)This action will set the buy and sell markup of the specified store to the specified values. It can be used to make a store provide a discount after a certain event for example.Sample use: ChangeStoreMarkup("KUSMITH",30,100) will set the buy and sell markup of KUSMITH.STO to 30 and 100 retrospectively. 361 DisplayStringPoint(I:Strref*,P:Location*)This action will display the relevant string at the specified location. The string will not be displayed in the combat log.Sample use: DisplayStringPoint(1000,[750.900]) will display strref 1000 at coordinates x=750 x=900. 362 RemoveStoreItem(S:Store*,S:Item*,I:Count*)This action will removed the specified item from the specified store by the specified number.Sample use: RemoveStoreItem("KUSMITH","BOW06",1) will remove one Shortbow +1 from KUSMITH.STO. 363 AddStoreItem(S:Store*,S:Item*,I:Count*,I:Flags*)This action will add the specfied number of the specified item to the specified store, using the specified flags. The only relevant flag is 1 which marks the item as identified in the store.Sample use: AddStoreItem("KUORK0","SCRL1T",1,1) will add one, identified Scroll of Ghost Armor to KUORK0.STO. 364 SetGlobalRandom(S:Variable*,S:Area*,I:Count*,I:Size*)This action will roll a dice using the specified parameters for the dice count and size and then set the specified variable to that value. The first six characters of the variable determine its scope (i.e. GLOBAL, LOCAL, MYAREA). The other characters determine the name of the variable.Sample use: SetGlobalRandom("GLOBALOH_Test_Roll","",1,6) will roll a six sided dice and store the result in the OH_Test_Roll global variable. 365 DestroyGroundPiles()This action will destroy all ground piles in the current area. Ground piles consist of any items that are dropped to the ground by the party, by slain enemies or any other creatures.Sample use: DestroyGroundPiles() will destroy all ground piles in the current area. 366 GameOver(I:StrRef*)This action will end the game prompting the load/quit screen which will display the specified strref as the reason for ending the game.Sample use: GameOver(19377) will end the game and display the message "The main character has been killed. You must restart the game." 367 SetWorldmap(S:Worlmap*)This action will set the currently active worldmap to the specified worldmap file. From that point onward the specified worldmap will be used for all subsequent map travel attempts.Sample use: SetWorldmap("worldm25") will set the worldmap to the Heart of Winter map. 368 WaitRandom(I:MinTime*,I:MaxTime*)This action will make the creature Wait() for a random number of seconds between the minimum and maximum values that are specified.Sample use: WaitRandom(1,6) will make the creature Wait() between 1 and 6 seconds. 369 StartRandomTimer(I:TimerID*,I:MinTime*,I:MaxTime*)This action will start a timer using a random value of seconds between the minimum and maximum values that are specified.Sample use: StartRandomTimer(99,1,10) will start a timer with the ID of 99 using a value between between 1 and 10 seconds. 370 ChangeStat(O:Object*,I:Stat*Stats,I:Value*,I:Modifier*StatMod)This action will change one of the base creature stats that are saved in the creature header. This should work on all stats below 49 in STATS.IDS. The stat can be increased or set based on the modifier parameter (taken from STATMOD.IDS).Sample use: ChangeStat(Myself,DEX,20,SET) will set the Dexterity score of the creature running the script to 20.
Wisp Posted November 2, 2014 Posted November 2, 2014 364 SetGlobalRandom(S:Variable*,S:Area*,I:Count*,I:Size*) This action will roll a dice using the specified parameters for the dice count and size and then set the specified variable to that value. The first six characters of the variable determine its scope (i.e. GLOBAL, LOCAL, MYAREA). The other characters determine the name of the variable. Sample use: SetGlobalRandom("GLOBALOH_Test_Roll","",1,6)will roll a six sided dice and store the result in the OH_Test_Roll global variable. Surely this is just how you get the right byte-code in spite of compilers which do not know to concatenate and unconcatenate the first and second arguments? You are actually supposed to use it like any other SetGlobal() action, right? (I.e., fixed in WeiDU 237.)
Avenger Posted November 2, 2014 Posted November 2, 2014 364 SetGlobalRandom(S:Variable*,S:Area*,I:Count*,I:Size*) This action will roll a dice using the specified parameters for the dice count and size and then set the specified variable to that value. The first six characters of the variable determine its scope (i.e. GLOBAL, LOCAL, MYAREA). The other characters determine the name of the variable. Sample use: SetGlobalRandom("GLOBALOH_Test_Roll","",1,6)will roll a six sided dice and store the result in the OH_Test_Roll global variable. Surely this is just how you get the right byte-code in spite of compilers which do not know to concatenate and unconcatenate the first and second arguments? You are actually supposed to use it like any other SetGlobal() action, right? (I.e., fixed in WeiDU 237.) Yes, thanks to your timely fix, this is no longer required.
K4thos Posted December 24, 2014 Posted December 24, 2014 what about these new Actions?: 371 ResetMorale(I:Failure*BOOLEAN, I:Level*)372 MoveToCampaignX(S:Campaign*)373 AddWorldmapAreaFlagX(S:Area*,I:Type*WMPFLAG)374 RemoveWorldmapAreaFlagX(S:Area*,I:Type*WMPFLAG)376 DisplayStringNoNameDlg(O:Object*,I:StrRef*)377 SetGlobalTimerRandomX(S:Name*,S:Area*,I:Min*GTimes,I:Max*GTimes)378 ExportParty(S:Name*) I'm especially interested in more details for 372, 373, 378 (others are self explementary). How to use them? What exactly they can be used for?
Avenger Posted December 25, 2014 Posted December 25, 2014 Those with an X in the end are not working (just placeholders). 378 ExportParty works very similarly to the similar action in vanilla IWD. ExportParty("IWD") would create up to 6 chr files (the party), in the characters folder. 376 DisplayStringNoNameDlg is exactly the same as DisplayStringNoNameDlg except it works in dialogs.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.