Can I merge this script? Stronghold Compilation.

Discuss all aspects related to modding Zandronum here.
Post Reply
Gigi
New User
Posts: 7
Joined: Mon Jun 04, 2012 10:27 pm
Location: Somewhere hot...

Can I merge this script? Stronghold Compilation.

#1

Post by Gigi » Mon Sep 23, 2013 9:59 am

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.)
Last edited by Gigi on Mon Sep 23, 2013 10:01 am, edited 1 time in total.

User avatar
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.

#2

Post by Hypnotoad » Mon Sep 23, 2013 11:54 am

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.

Gigi
New User
Posts: 7
Joined: Mon Jun 04, 2012 10:27 pm
Location: Somewhere hot...

RE: Can I merge this script? Stronghold Compilation.

#3

Post by Gigi » Mon Sep 23, 2013 8:28 pm

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?

User avatar
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.

#4

Post by Hypnotoad » Mon Sep 23, 2013 9:43 pm

What is the error? What are you trying to compile (I'm assuming the script you made doesn't have 523 lines)?

Gigi
New User
Posts: 7
Joined: Mon Jun 04, 2012 10:27 pm
Location: Somewhere hot...

RE: Can I merge this script? Stronghold Compilation.

#5

Post by Gigi » Tue Sep 24, 2013 2:03 am

Hypnotoad wrote: What is the error? What are you trying to compile (I'm assuming the script you made doesn't have 523 lines)?
Someone's ACS source scripts.

User avatar
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.

#6

Post by Hypnotoad » Tue Sep 24, 2013 2:13 am

Gigi wrote:
Hypnotoad wrote: What is the error? What are you trying to compile (I'm assuming the script you made doesn't have 523 lines)?
Someone's ACS source scripts.
Okay, and does this script itself #include or #import any files? You will need them present for the compiler.

Untitled
Forum Regular
Posts: 519
Joined: Sat Dec 29, 2012 4:41 pm
Location: it is a mystery

RE: Can I merge this script? Stronghold Compilation.

#7

Post by Untitled » Sun Sep 29, 2013 1:39 pm

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.
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!"
Spoiler: Me in a nutshell (Open)
<Untitled> this is a terrible idea
<Untitled> lets do it anyway

<Untitled> Depends
<Untitled> What kind of wad error is "Address not Mapped to Object (Signal 11)"?

<Untitled> So today I found out that stupidity is nested fractally
<Untitled> There is no lower bound
Projects:
SamsaraHold http://zandronum.com/forum/showthread.php?tid=3053

Post Reply