Staredit Network > Forums > Modding Assistance > Topic: Various Questions, some involving Plugins
Various Questions, some involving Plugins
Jul 24 2012, 10:11 pm
By: Sand Wraith  

Jul 24 2012, 10:11 pm Sand Wraith Post #1

she/her

1) Is it possible to control music and sounds?

2) Is there any sort of sterilization of iscript that IceCC uses? Specifically, I think I may have need of script blocks that are not linked by any other opcodes but are associated with a unit mostly outside of data. Would anything get in the way of this?

3) Is it possible to manipulate graphics and sounds outside of StarCraft's engine? E.g. importing a media library into a plugin's code.

There will most likely be more questions. Stay tuned.




Jul 25 2012, 12:44 am IskatuMesk Post #2

Lord of the Locker Room

1 Define control. If you mean music events, you'll be looking at reverse engineering their sound system. Shadowflare has a playlist plugin for memgraft, but it's not likely to be as sophisticated as what you desire.

2 Define sterilization.

3 Like I said to the other guy, anything is possible through reverse engineering. But you'll most likely be doing that yourself.



Show them your butt, and when you do, slap it so it creates a sound akin to a chorus of screaming spider monkeys flogging a chime with cacti. Only then can you find your destiny at the tip of the shaft.

Jul 25 2012, 2:07 am Sand Wraith Post #3

she/her

1) Can you stop sounds played through the trigger system?

2) Does IceCC clean up blocks that aren't used anywhere at all?

a) There are a bunch of entries in orders.dat that are marked as unused, but I am dubious - 12 Attack Ground, 13 Hover, 16 Nothing 1, 17 Power Up, 24 Nothing 3, 104 Guardian Aspect, 174 Warp In are all marked as unused, but 12, 104, and 174 look pretty sketchy. Are they actually unused anywhere?

EDIT:

b) Can the successful activation of a spell be detected?

Post has been edited 1 time(s), last time on Jul 25 2012, 2:17 am by Sand Wraith.




Jul 25 2012, 2:28 am IskatuMesk Post #4

Lord of the Locker Room

1 - Don't know anything about triggers. But you could probably reprogram their sound system to handle stop commands.

2 - Icecc most definitely does optimization related stuff, some of which can cause problems otherwise not present in compiled scripts. I think it's safe to assume it removes unused blocks, because it definitely merges locals.

Orders.dat is very hardcodey. A lot of orders issued through iscript don't do something or are only functional when they are expected. It is safe to assume a lot of unused stuff either has no code associated with it or is totally inaccessible.

As for spells, not that I know of without coding or through iscript on the overlays themselves (which is not very powerful).



Show them your butt, and when you do, slap it so it creates a sound akin to a chorus of screaming spider monkeys flogging a chime with cacti. Only then can you find your destiny at the tip of the shaft.

Jul 25 2012, 4:26 am Sand Wraith Post #5

she/her

1) Plugins: Is it possible to set shield value (99% certain, just double checking) for a unit that has shields enabled? Does shield value have to be both non-zero and enabled, just non-zero, or just enabled?

2) Is it possible to change a unit's weapons without resorting to unit ID changes?

3) What are /all/ effects of unit ID swapping?

EDIT:

4) Does anyone have Quantum's contact info? (Developer of MPQDraft and ThunderGraft.) I figure he probably knows how to work some sinister sorcery. I already see some sort of sound stopping function in ThunderGraft's source code.

EDIT2:

5) Is it possible to remove a unit with plugins (without the death animation, so that the removal is like the trigger action)?

EDIT3:

6) Is it possible to set, decrease, or increase an upgrade or tech with a plugin? (Maybe BWAPI can do this?)

EDIT4:

7) How do you use the upgrade and tech namespaces and enumerations?

EDIT5:

INCREDIBLE. CURRENT HP CAN BE OVER MAXIMUM HP BUT CURRENT SHIELDS CANNOT BE OVER MAXIMUM SHIELDS.

THIS IS SOME RETARDED BULLSHIT.

Post has been edited 6 time(s), last time on Jul 26 2012, 2:02 am by Sand Wraith.




Jul 26 2012, 3:24 am Voyager7456 Post #6

Responsible for my own happiness? I can't even be responsible for my own breakfast

Quote from Sand Wraith
6) Is it possible to set, decrease, or increase an upgrade or tech with a plugin? (Maybe BWAPI can do this?)

Answering this off the top of my head, because I used to do a lot of shit with it.

A value of > 255 means the technology has been researched. Otherwise it is unresearched. Research adds 256 to the value. All the addresses are between 580000 and 590000. Find Stim Packs and they go in a pattern from there, except for the Brood War techs. Basically look at the ID list.



PLAYER ONE:

0058CF2B = Stim Packs Researched - P1
0058CF2C = Lockdown Researched - P1
0058CF2D = EMP Shockwave Researched - P1
0058CF2E = Spider Mines Researched - P1
0058CF2F = Scanner Sweep Researched? - P1
0058CF30 = Siege Mode Researched - P1
0058CF31 = Defense Matrix Researched? - P1
0058CF32 = Irradiate Researched - P1
0058CF33 = Yamato Gun Researched - P1
0058CF34 = Cloaking Field Researched? - P1
0058CF35 = Personnel Cloaking Researched - P1
0058CF36//0058CF37 = Burrow Researched - P1
0058CF38 = Spawn Broodling Researched - P1
0058CF39 = Dark Swarm Researched? - P1
0058CF3A = Plague Researched - P1
0058CF3B = Consume Researched - P1
0058CF3C = Ensnare Researched - P1
0058CF3D = Parasite Researched? - P1
0058CF3E = Psionic Storm Researched - P1
0058CF3F = Hallucination Researched - P1
0058CF40 = Recall Researched - P1
0058CF41 = Stasis Researched - P1
0058CF42 = Archon Warp Researched? - P1

0058F127 = Restoration Researched - P1
0058F128 = Disruption Web Researched - P1
0058F12A = Mind Control Researched - P1
0058F12B = Dark Archon Meld Researched? - P1
0058F12C = Feedback Researched - P1
0058F12D = Optical Flare Researched - P1
0058F12E = Maelstrom Researched - P1
0058F130 = Lurker Aspect Researched - P1





PLAYER TWO:

0058CF43 = Stim
0058CF44 = Lockdown
0058CF45 = EMP
0058CF46 = Spider Mines
0058CF47 = Scanner Sweep
0058CF48 = Siege Mode
0058CF49 = Defense Matrix
0058CF4A = Irradiate
0058CF4B = Yamato Gun
0058CF4C = Cloaking Field
0058CF4D = Personnel Cloaking
0058CF4E/0058CF4F = Burrow
0058CF50 = Spawn Broodling Researched - P2
0058CF52 = Plague Researched - P2
0058CF53 = Consume Researched - P2
0058CF54 = Ensnare Researched - P2
0058CF55 = Parasite
0058CF56 = Psionic Storm
0058CF57 = Hallucination
0058CF58 = Recall
0058CF59 = Stasis
0058CF5A = Archon Warp

0058F13B - Restoration
0058F13C - Disruption Web
0058F13E - Mind Control
0058F13F - Dark Archon Meld
00581140 - Feedback
0058F141 - Optical Flare
0058F142 - Maelstrom
0058F143 - Lurker Aspect




PLAYER THREE:

0058CF5B = Stim
0058CF5C = Lockdown
0058CF5D = EMP
0058CF5E = Spider Mines
0058CF5F = Scanner Sweep
0058CF60 = Siege Mode
0058CF61 = Defense Matrix
0058CF62 = Irradiate
0058CF63 = Yamato Gun



PLAYER FOUR:

0058CF7B = Yamato Gun



PLAYER FIVE:

0058CF93 = Yamato Gun



PLAYER SIX:

0058CFAB = Yamato Gun



PLAYER SEVEN:

0058CFC3 = Yamato Gun



PLAYER EIGHT:

0058CFDB = Yamato Gun



all i am is a contrary canary
but i'm crazy for you
i watched you cradling a tissue box
sneezing and sniffling, you were still a fox


Modding Resources: The Necromodicon [WIP] | Mod Night
My Projects: SCFC | ARAI | Excision [WIP] | SCFC2 [BETA] | Robots vs. Humans | Leviathan Wakes [BETA]


Jul 26 2012, 4:19 am Sand Wraith Post #7

she/her

Which version are these addresses for? (or this a dumb question?)




Jul 26 2012, 4:21 am Voyager7456 Post #8

Responsible for my own happiness? I can't even be responsible for my own breakfast

Oh right, sorry. These are for 1.15.1. I believe they stay relatively in the same positions between versions, but you might need to look around again if you're using another version. I don't think they'd move out of the 580000-590000 range though.



all i am is a contrary canary
but i'm crazy for you
i watched you cradling a tissue box
sneezing and sniffling, you were still a fox


Modding Resources: The Necromodicon [WIP] | Mod Night
My Projects: SCFC | ARAI | Excision [WIP] | SCFC2 [BETA] | Robots vs. Humans | Leviathan Wakes [BETA]


Jul 26 2012, 4:30 am Sand Wraith Post #9

she/her

I'm probably just going to look through BWAPI tomorrow or something. I'm almost certain it has the addresses, otherwise, it wouldn't be able to order the computer to research them.

1) How do I use the deathTable for GPTP? (If it's the same thing as EUDs/EPDs, I could really make use of it.)




Jul 26 2012, 3:53 pm Sand Wraith Post #10

she/her

AWWW YEAH I GOT IT TO WORK (after much trial and error)

I'll write this down here so other people don't have to figure it out (unless they already did, in which case, fuck you for not telling me)

Code
bool nextFrame(){
BOOL* Game_Is_Paused = (BOOL*) 0x006509C4; //0x006509AC for 1.15.1;

    if (!*Game_Is_Paused)//If the game is not paused
    {
             
        int unitTypeId = 1; // ID can be taken from DatEdit. 1 == Ghost
        int PlayerWithDeaths = 0; // 0 == player 1
        UNITDEATHS*             unit_deaths;
        UNITDEATHS*          deathTable;
        deathTable         = (UNITDEATHS*)(VERSION::UnitDeaths);
        unit_deaths        = &deathTable[unitTypeId];
        resources->playermin[PlayerWithDeaths] = unit_deaths->player[PlayerWithDeaths];

    }
    curFrame += 1;
      return true;

}





Jul 27 2012, 12:51 am Sand Wraith Post #11

she/her

Voy, I need your help (or if anyone else can help, that would be great).

I've found the primary address for the tech and upgrades from BWAPI: https://code.google.com/p/bwapi/source/browse/branches/bwapi4/bwapi/BWAPI/Source/BW/Offsets.h#602

I've even used the addresses with ArtMoney to manually research Stim Packs and Lurker Aspect. However, I am at the point where I need to actually implement this address into GPTP's code. Can anyone help with this? How are the structures supposed to look like? How do I set everything up?




Jul 27 2012, 2:21 am Voyager7456 Post #12

Responsible for my own happiness? I can't even be responsible for my own breakfast

Something like this should work:

Quote
/**
BEGIN DECLARATIONS FOR RESEARCH DETECTION :3
**/

short *P1InfrastructureAspect = (short*)0x0058CF33; //(YamatoCannon)
short *P2InfrastructureAspect = (short*)0x0058CF4B;
short *P3InfrastructureAspect = (short*)0x0058CF63;
...

short *P1DefenseAspect = (short*)0x0058CF32; //(Irradiate)
short *P2DefenseAspect = (short*)0x0058CF4A;
short *P3DefenseAspect = (short*)0x0058CF62;
...

//this continues for each tech


void nextFrame()
{

if(*P1InfrastructureAspect > 255) {
//player 1 has researched Yamato Cannon
*P1DefenseAspect = 256; //give Player 1 Irradiate
}

//likewise, we could do something like this
if(*P2InfrastructureAspect > 255) {
//player2 has researched Yamato Cannon
*P1InfrastructureAspect = 0; //I guess only one player can have Yamato cannon researched or something
}

}




all i am is a contrary canary
but i'm crazy for you
i watched you cradling a tissue box
sneezing and sniffling, you were still a fox


Modding Resources: The Necromodicon [WIP] | Mod Night
My Projects: SCFC | ARAI | Excision [WIP] | SCFC2 [BETA] | Robots vs. Humans | Leviathan Wakes [BETA]


Jul 27 2012, 6:12 pm Sand Wraith Post #13

she/her

All right, thanks. I'll begin working on this later.




Jul 31 2012, 12:16 am Sand Wraith Post #14

she/her

Do AIs take advantage of spells given to units that normally do not have the given spell?

E.g. if I give a Battlecruiser an Irradiate, would the AI cast it, ever?




Jul 31 2012, 12:40 am IskatuMesk Post #15

Lord of the Locker Room

No, they won't. It's all hardcoded.



Show them your butt, and when you do, slap it so it creates a sound akin to a chorus of screaming spider monkeys flogging a chime with cacti. Only then can you find your destiny at the tip of the shaft.

Jul 31 2012, 1:49 am Sand Wraith Post #16

she/her

For once, that's a good thing, lol.

Are there any limits on tooltips? I feel as though there might be a character, height, or other such limit, but I don't remember.




Jul 31 2012, 5:56 pm xAngelSpiritx Post #17

eternal lurker

Quote from Sand Wraith
For once, that's a good thing, lol.

Are there any limits on tooltips? I feel as though there might be a character, height, or other such limit, but I don't remember.
There is indeed a limit, but I never tested it thoroughly enough to know it exactly.

Just know that if the game crashes when you mouseover a button, it's because the tooltip is too long.



None.

Jul 31 2012, 6:08 pm IskatuMesk Post #18

Lord of the Locker Room

The character limit is actually not that long. I would say it's 255 given the other limits but it might even be lower (128). That will need some experimenting.



Show them your butt, and when you do, slap it so it creates a sound akin to a chorus of screaming spider monkeys flogging a chime with cacti. Only then can you find your destiny at the tip of the shaft.

Jul 31 2012, 11:43 pm Sand Wraith Post #19

she/her

Can a unit1 train a unit2 at all, where unit1 is not a Carrier or Reaver (or building)?

Or is that utterly impossible?




Aug 1 2012, 5:32 pm Sand Wraith Post #20

she/her

2) Does anyone know what the unknown techs do? Or anything at all about them.

I'm specifically looking for a tech or method to call an iscript block that does not require clicking somewhere. Instant cast, if you will. I've already salvaged Stim Pack.

3) Can units research/upgrade?




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[09:38 pm]
NudeRaider -- Ultraviolet
Ultraviolet shouted: NudeRaider sing it brother
trust me, you don't wanna hear that. I defer that to the pros.
[07:56 pm]
Ultraviolet -- NudeRaider
NudeRaider shouted: "War nie wirklich weg" 🎵
sing it brother
[2024-4-27. : 6:24 pm]
NudeRaider -- "War nie wirklich weg" 🎵
[2024-4-27. : 3:33 pm]
O)FaRTy1billion[MM] -- o sen is back
[2024-4-27. : 1:53 am]
Ultraviolet -- :lol:
[2024-4-26. : 6:51 pm]
Vrael -- It is, and I could definitely use a company with a commitment to flexibility, quality, and customer satisfaction to provide effective solutions to dampness and humidity in my urban environment.
[2024-4-26. : 6:50 pm]
NudeRaider -- Vrael
Vrael shouted: Idk, I was looking more for a dehumidifer company which maybe stands out as a beacon of relief amidst damp and unpredictable climates of bustling metropolises. Not sure Amazon qualifies
sounds like moisture control is often a pressing concern in your city
[2024-4-26. : 6:50 pm]
Vrael -- Maybe here on the StarEdit Network I could look through the Forums for some Introductions to people who care about the Topics of Dehumidifiers and Carpet Cleaning?
[2024-4-26. : 6:49 pm]
Vrael -- Perhaps even here I on the StarEdit Network I could look for some Introductions.
[2024-4-26. : 6:48 pm]
Vrael -- On this Topic, I could definitely use some Introductions.
Please log in to shout.


Members Online: Oh_Man, RIVE, Excalibur