Can I merge this script? Stronghold Compilation.
Can I merge this script? Stronghold Compilation.
Trying to build a compilation out of pieces of other mods to create a well balanced modification for my server. However, I am having trouble here. I want to merge this script
//this will open up a tier based on input from the user//[TIHan]
script 789 (int tier)
{
if (tier == 1)
{
print(s:"Warning: Tier already opened!\n");
}
else if (tier == 2 && g_currentTier < 2)
{
g_currentTier = 2;
}
else if (tier == 3 && g_currentTier < 3)
{
g_currentTier = 3;
}
else if (tier == 4 && g_currentTier < 4)
{
g_currentTier = 4;
}
else if (tier == 5 && g_currentTier < 5)
{
g_currentTier = 5;
}
else if (tier == 6 && g_currentTier < 6)
{
g_currentTier = 6;
}
else if (tier > 1 && tier < 7)
{
print(s:"Warning: Tier already opened!\n");
}
else
{
print(s:"Warning: Incorrect Tier!\n");
}
ACS_Execute(10, 0, 0);
}
With another map file. But I don't know how to do that since everything is already compiled. If I can't merge it, how do I add it as an individual modification? One that doesn't conflict with other addons present?
This is all very new to me, and from what I could put together. I don't know how to proceed.. It's obvious this was taken from someone else's work and I take no credit for it. All I want is to build a balanced modification. (And if any of you played stronghold. I host a server that isn't on 24/7. The clients I have don't have the time to keep replaying the same tiers over and over. So, I really need some help here. This script is designed to force open each tier individually as opposed to using the debug mode that is already in the game.)
//this will open up a tier based on input from the user//[TIHan]
script 789 (int tier)
{
if (tier == 1)
{
print(s:"Warning: Tier already opened!\n");
}
else if (tier == 2 && g_currentTier < 2)
{
g_currentTier = 2;
}
else if (tier == 3 && g_currentTier < 3)
{
g_currentTier = 3;
}
else if (tier == 4 && g_currentTier < 4)
{
g_currentTier = 4;
}
else if (tier == 5 && g_currentTier < 5)
{
g_currentTier = 5;
}
else if (tier == 6 && g_currentTier < 6)
{
g_currentTier = 6;
}
else if (tier > 1 && tier < 7)
{
print(s:"Warning: Tier already opened!\n");
}
else
{
print(s:"Warning: Incorrect Tier!\n");
}
ACS_Execute(10, 0, 0);
}
With another map file. But I don't know how to do that since everything is already compiled. If I can't merge it, how do I add it as an individual modification? One that doesn't conflict with other addons present?
This is all very new to me, and from what I could put together. I don't know how to proceed.. It's obvious this was taken from someone else's work and I take no credit for it. All I want is to build a balanced modification. (And if any of you played stronghold. I host a server that isn't on 24/7. The clients I have don't have the time to keep replaying the same tiers over and over. So, I really need some help here. This script is designed to force open each tier individually as opposed to using the debug mode that is already in the game.)
Last edited by Gigi on Mon Sep 23, 2013 10:01 am, edited 1 time in total.
- Hypnotoad
- Retired Staff / Community Team Member
- Posts: 528
- Joined: Tue May 29, 2012 8:50 pm
- Location: Britland
RE: Can I merge this script? Stronghold Compilation.
It looks like that script depends on variables defined in the stronghold scripts. If stronghold uses libraries, you should be able to use the #import directive. If done correctly, you will then be able to compile the script (I assume you know how to): put the compiled script lump in between a_start and a_end entries in a pwad, and make another text entry called LOADACS, in there simply type the name of the compiled lump. Then add the pwad to the wads you host on your server.
RE: Can I merge this script? Stronghold Compilation.
I've tried to compile it. But ACC gives me errors about line 523 every time. I got the source libraries in the same directory as the compiler. How did anyone manage to make addon's for this modification if the library is full of errors?
- Hypnotoad
- Retired Staff / Community Team Member
- Posts: 528
- Joined: Tue May 29, 2012 8:50 pm
- Location: Britland
RE: Can I merge this script? Stronghold Compilation.
What is the error? What are you trying to compile (I'm assuming the script you made doesn't have 523 lines)?
RE: Can I merge this script? Stronghold Compilation.
Someone's ACS source scripts.Hypnotoad wrote: What is the error? What are you trying to compile (I'm assuming the script you made doesn't have 523 lines)?
- Hypnotoad
- Retired Staff / Community Team Member
- Posts: 528
- Joined: Tue May 29, 2012 8:50 pm
- Location: Britland
RE: Can I merge this script? Stronghold Compilation.
Okay, and does this script itself #include or #import any files? You will need them present for the compiler.Gigi wrote:Someone's ACS source scripts.Hypnotoad wrote: What is the error? What are you trying to compile (I'm assuming the script you made doesn't have 523 lines)?
RE: Can I merge this script? Stronghold Compilation.
What is the function you're trying to do with the script? Wait, let me guess, a function to open up tiers.
Since I've had days where I've updated Samsara/Stronghold more than once a day, I would be delighted to have this, and I also have experience with the Samsara/Stronghold codebase.
EDIT: Currently, what I do to modify ACS in stronghold, is create a copy of strnghld.acs, and edit the acs file directly. Then I compile it, and make a pk3 with only strnghld.acs and strnghld.o (properly formatted though, strnghld.acs is in the "acs_src" folder and strnghld.o is in the "acs" folder), this way when stronghold loads itself, the modifyed strnghld.acs/.o overwrites the usual one.
Here's what I do:
1. I open up the RCon of the server.
2. Enter in "ChangeMap STRXX" (XX is the map number)
3. Enter in "Puke 910" (It's the win script)
4. Repeat with all maps until you restore progress.
I'd like to create a script to make things more convenient, so this actually interests me.
Also, what is the modification you speak of? I'm one of the people who likes Stronghold, so mods for it are...intriguing, to say the least.
Since I've had days where I've updated Samsara/Stronghold more than once a day, I would be delighted to have this, and I also have experience with the Samsara/Stronghold codebase.
EDIT: Currently, what I do to modify ACS in stronghold, is create a copy of strnghld.acs, and edit the acs file directly. Then I compile it, and make a pk3 with only strnghld.acs and strnghld.o (properly formatted though, strnghld.acs is in the "acs_src" folder and strnghld.o is in the "acs" folder), this way when stronghold loads itself, the modifyed strnghld.acs/.o overwrites the usual one.
Here's what I do:
1. I open up the RCon of the server.
2. Enter in "ChangeMap STRXX" (XX is the map number)
3. Enter in "Puke 910" (It's the win script)
4. Repeat with all maps until you restore progress.
I'd like to create a script to make things more convenient, so this actually interests me.
Also, what is the modification you speak of? I'm one of the people who likes Stronghold, so mods for it are...intriguing, to say the least.
Last edited by Untitled on Sun Sep 29, 2013 1:42 pm, edited 1 time in total.
"I'm in despair! The fact someone would give me the title 'Forum Regular' has left me in despair!"
SamsaraHold http://zandronum.com/forum/showthread.php?tid=3053
Spoiler: Me in a nutshell (Open)Projects:
SamsaraHold http://zandronum.com/forum/showthread.php?tid=3053