Skip to content

Posts from Do such scripts even exist, and if so, where can I find them?

No ratings yet — be the first to rate!
#1
Auto-translated
I need a couple of objects for creating a map, and the question is, where can I find them? 1. The first object is a border guard that disappears after a specific phrase is entered. It could also be a fortune teller's hut where a reward is given – it's not that important. The main thing is that the condition for completing the quest is entering a specific word or number, and not, for example, having an artifact, as is usually the case. Something like the sphinx from WOG, but with an editable task and reward. 2. An event that, when activated, opens a file with music or video located in the game's folder. For example, you activate the event with your hero, which contains the path to the audio file, and then it opens as if you had clicked on it with the mouse. I understand that the very existence of such scripts is unlikely, but still, maybe someone has encountered them or knows other ways to solve these tasks. I would be grateful for any help.
#2
Auto-translated

What you need is possibly only available on the ERA platform.
Example of a completed script for the first question:

!?OB3/133/0;                                                                              (object on the map at X/Y/Z coordinates - you can change these to your own)
    !!OBv998/v999/v1000:S;                                                        (disable standard object properties)
    !!VRz47:S^NPC Guard Name^;                                   (put any header between the ^ ^ symbols)
    !!VRz48:S^" - state the password, traveler!"^;                         (the question asked to the player)
    !!IF30/z47/z48;                                                                     (!!IF:  D30   , without a space, between F: and  D  /the forum converts this combination into a smiley/)
    !!IF:E1/30;                                                                                              
    !!VRz49:Sz1;
    !!VRz50:S^Sesame^;                                                                                (the answer to the question)
    !!IF&z49=z50:V8/1;
    !!VRz50:S^SESAME^;                                                            (the answer to the question, in case Caps Lock is on)
    !!IF&z49=z50:V8/1;
    !!IF&8:M^"- correct, pass through!"^;
    !!UN&8:Ov998/v999/v1000;                                            (remove the object that was just visited, in case of a correct answer)
    !!IF&-8:M^"- incorrect, get lost"^;
    !!IF:V8/0;
-------------------
Example of a completed script for the second question:
 
!?OB140/7/0;                                                                                   (object at coordinates 140/7/0 /let's say an NPC speaking with the player/)
!!MP:P^guitar^/1/0;                                                                      (start playing mp3 file guitar.mp3)  
!!IF:M^dialogue with the NPC the player is interacting with^;     (dialogue text told to the player while the audio file is playing)
-------------------------------------
If you wish to create on the ERA platform, I am attaching a link to the ERA official forum page: http://wforum.heroes35.net/index.php
You can also ask questions in the ERA Discord channel: https://discord.com/invite/bvfJGZe

In reply to HeLG TLA
#3
Auto-translated
Thank you very much, HeLG TLA. The first script actually worked, although I had to tinker with it to figure out where to input it. But the second one simply won't work. I found the script !!MP:S#, which allows you to replace the standard in-game music, but I can't get it to play immediately when visiting an object. !!MP:P gives an error in the game. What could be causing this?

And another question – is it possible to disable the ability to enter cheats through file editing or using scripts? Or to disable the chat altogether?
In reply to chakie
#4
Auto-translated
chakie
But the second one just won't work. I found a script !!MP:S#, which allows you to replace the standard in-game melody, but I can't figure out how to make it play immediately when visiting an object. When I use !!MP:P, the game gives an error. What could be the reason for this?

And another question - is it possible to disable the ability to enter cheats by editing files or using scripts? Or to disable the chat altogether?
-------------------------------------------
If you get an error on the !!MP:P receiver, then most likely you either have an old version of ERA or a regular WoG. Because the ability to expand the functionality of working with sound files was added somewhere in version 2.8.8 or later.
Clarification: the MP3 file itself must physically be present in your mod, and the mod must be enabled in the mod manager.
Example of file location: HoMM3 ERA\Mods\Stalker\MP3\guitar.mp3 Here, the Stalker directory is the name of the mod (you will have your own), enabled in the mod manager.
Regarding disabling cheat input: it is possible to change/add your own reaction to input using scripts. As an example, when any cheat is entered, activate a loss, or prescribe some other "punitive" measure. You can completely disable the use of chat (add your own script reaction to the TAB key).
Example:
!?FU(OnChat)&x1=1;
!!SN:X?t/?z2;
!VRz100:S^WOGSARUMAN^; cheat for all spells on the adventure map
!!UN&z2=z100:Q0/1; loss for the active player
-------------------------------------------
This script will only work on ERA; on WoG, it will most likely give an error.
-------------------------------------------
If you need any other scripts, you can look at the examples in my Stalker map-mod.
A little lower in this section, there is a subsection with this mod, with links for download.

Statistics

Welcome our newest member: Фёдор Фёдорович