Artifacts revisited
Artifacts revisited
Can anybody come up with a good way of using the new map mod support to add artifacts with technologies to skirmish maps?
Something good enough to be implemented in FlaME, probably. It's easy interface-wise: add a "Technology" object property, that is the artifact dropped for any object that is not an artifact and the technology unlocked if the object is an artifact.
That might be useful for example for hover maps, where you can get hover technology earlier by defeating some scavenger base or something like that.
Something good enough to be implemented in FlaME, probably. It's easy interface-wise: add a "Technology" object property, that is the artifact dropped for any object that is not an artifact and the technology unlocked if the object is an artifact.
That might be useful for example for hover maps, where you can get hover technology earlier by defeating some scavenger base or something like that.
Maps | Tower Defense | NullBot AI | More NullBot AI | Scavs | More Scavs | Tilesets | Walkthrough | JSCam
Re: Artifacts revisited
I've thought about this too. It would be a great feature
I've seen many maps were the Crate Artifact was place all over the map. They'd light the mini map with dozens of green blips, but all I ever found when I recovered them was disappointment
I've seen many maps were the Crate Artifact was place all over the map. They'd light the mini map with dozens of green blips, but all I ever found when I recovered them was disappointment
This is why some features aren't implemented: http://forums.wz2100.net/viewtopic.php?f=30&t=7490&view=unread#p87241
Re: Artifacts revisited
I tested some scripts for it today and it worked in 2.3.8. Master doesn't seem to load scripts for skirmish though, in my few attempts.
Re: Artifacts revisited
Do want!Flail13 wrote:some scripts
Maps | Tower Defense | NullBot AI | More NullBot AI | Scavs | More Scavs | Tilesets | Walkthrough | JSCam
Re: Artifacts revisited
look at my mod artefactV04.wz here : https://skydrive.live.com/?cid=9506c397 ... 59C968!288
You will see on top of the mountain in sk-rush a pylon that you can grab by moving close enough. It unlock hover research.
The tricky part was to use something else then the artefact to use as item. Since that "crate'" have it's own behavior in source code. that make it disapear half of the time with no research.
I'll let Flail13 look at that. It's a bit messy right now. I needed to reproduce the trigger for each players to work properly in mp. I dont know if he have a better solution...
@NoQ : the file that I edit to do that is the same that gives the starting research. I dont know how much you want it to be on the map. But we could also give it straight away.
You will see on top of the mountain in sk-rush a pylon that you can grab by moving close enough. It unlock hover research.
The tricky part was to use something else then the artefact to use as item. Since that "crate'" have it's own behavior in source code. that make it disapear half of the time with no research.
I'll let Flail13 look at that. It's a bit messy right now. I needed to reproduce the trigger for each players to work properly in mp. I dont know if he have a better solution...
@NoQ : the file that I edit to do that is the same that gives the starting research. I dont know how much you want it to be on the map. But we could also give it straight away.
Heretic 2.3 improver and proud of it.
Re: Artifacts revisited
a map with an artifact script
The script I used is similar to Iluvalar's. I thought it was better to use a loop to cycle each player for picking up the artifact, and it relies on a structure being destroyed to place the artifact. Scavangers need to be turned on for the research facility that provides the artifact to exist, and again, it doesn't work in master.
I didn't realise the artifact disappeared by itself sometimes, so I adjusted my script to only refer only to a position, instead of the position of the artifact.
Like Iluvalar's script, it is probably better to use something other than a "crate" to receive the research, and rewriting rules.slo might also be better than my unique scripts. I'll get around to testing it some more another day.
The script I used is similar to Iluvalar's. I thought it was better to use a loop to cycle each player for picking up the artifact, and it relies on a structure being destroyed to place the artifact. Scavangers need to be turned on for the research facility that provides the artifact to exist, and again, it doesn't work in master.
I didn't realise the artifact disappeared by itself sometimes, so I adjusted my script to only refer only to a position, instead of the position of the artifact.
Like Iluvalar's script, it is probably better to use something other than a "crate" to receive the research, and rewriting rules.slo might also be better than my unique scripts. I'll get around to testing it some more another day.
Re: Artifacts revisited
I think having artifact script as a separate file is better, because we don't need to maintain rules.* up to date with every new version. Still, using *.wrf files seems to be discouraged nowadays, so we should ask how are we actually supposed to script for master (?)
Probably this topic should be moved to development/scripting (?)
Probably this topic should be moved to development/scripting (?)
Maps | Tower Defense | NullBot AI | More NullBot AI | Scavs | More Scavs | Tilesets | Walkthrough | JSCam
Re: Artifacts revisited
We are still thinking about that, so the question should rather be asked back -- how would you like to script for master?NoQ wrote:so we should ask how are we actually supposed to script for master
Re: Artifacts revisited
that's what missed me :Flail13 wrote:a map with an artifact script
I thought it was better to use a loop to cycle each player for picking up the artifact
Code: Select all
function void art1Take(INT _player)
The wrf part is a lot cleaner gj. I think it's compatible with 2.3.7 and previous . And I believe it's a lot better the merging in rules.slo.
Heretic 2.3 improver and proud of it.
Re: Artifacts revisited
Per wrote:We are still thinking about that, so the question should rather be asked back -- how would you like to script for master?NoQ wrote:so we should ask how are we actually supposed to script for master
Code: Select all
do_what_i_want();
I mean, i'm in no position to advice here, i'm a simple map maker, i hardly know even the current system
My only wish is that there is at least some part of it that i can use for map-mods that doesn't break every 3 versions
Maps | Tower Defense | NullBot AI | More NullBot AI | Scavs | More Scavs | Tilesets | Walkthrough | JSCam
- milo christiansen
- Regular
- Posts: 749
- Joined: 02 Jun 2009, 21:23
- Location: Perrinton Michigan
Re: Artifacts revisited
When I used artifacts for fastplay I would place them in script then check for distance from player units and remove it if distance < 200. Then you could trigger whatever behavior you wanted such as adding units or giving research.
I think I'll take a look a these maps/scripts they sound interesting
I think I'll take a look a these maps/scripts they sound interesting
In general, if you see glowing, pulsating things in the game, you should click on them.
- Demigod Game Ganual
- Demigod Game Ganual
- milo christiansen
- Regular
- Posts: 749
- Joined: 02 Jun 2009, 21:23
- Location: Perrinton Michigan
Re: Artifacts revisited
My (untested) try at a set of artifact scripts.
The scripts as is are optimized for use with things like random placement. You just call a function with the coords to place the artifact at and use the return value to index into an array of status flags waiting until it equals SLOTCOLLECTED then do your thing and set the flag to SLOTCLEAR so it can be reused. Not the best way to use for pre-placing artifacts but cool if you want them to randomly spawn or be placed when something is destroyed.
The scripts as is are optimized for use with things like random placement. You just call a function with the coords to place the artifact at and use the return value to index into an array of status flags waiting until it equals SLOTCOLLECTED then do your thing and set the flag to SLOTCLEAR so it can be reused. Not the best way to use for pre-placing artifacts but cool if you want them to randomly spawn or be placed when something is destroyed.
- Attachments
-
- MP-SK Artifact Scripts.7z
- WARNING!!! Untested, sorry ran out of time :)
- (2.04 KiB) Downloaded 205 times
In general, if you see glowing, pulsating things in the game, you should click on them.
- Demigod Game Ganual
- Demigod Game Ganual
- milo christiansen
- Regular
- Posts: 749
- Joined: 02 Jun 2009, 21:23
- Location: Perrinton Michigan
Re: Artifacts revisited
Updated scripts
This pack includes my earlier ones along with a set made for placement in the map editor. The new scripts have been made with machine generation in mind so including them in a map from flame should plausible
I f you want to use both dynamic and static placement in the same map you can rename the current scripts so they don't clash or you can just wait a day or so until I do the final version(s)
WARNING!!! The dynamic placement scripts in this file have BIG problems mostly fixed in the next download farther down the page.
This pack includes my earlier ones along with a set made for placement in the map editor. The new scripts have been made with machine generation in mind so including them in a map from flame should plausible
I f you want to use both dynamic and static placement in the same map you can rename the current scripts so they don't clash or you can just wait a day or so until I do the final version(s)
WARNING!!! The dynamic placement scripts in this file have BIG problems mostly fixed in the next download farther down the page.
- Attachments
-
- MP-SK Artifact Scripts.7z
- Artifact scripts - Tested and working :)
- (2.53 KiB) Downloaded 200 times
Last edited by milo christiansen on 14 Jul 2011, 20:14, edited 1 time in total.
In general, if you see glowing, pulsating things in the game, you should click on them.
- Demigod Game Ganual
- Demigod Game Ganual
Re: Artifacts revisited
a few points about the scripts...
have they been tested in multiplayer?
should we be using crates with their hard-coded disappearing?
would it be better to have them in the unique map folder, to give them unique paths for each map?
have they been tested in multiplayer?
should we be using crates with their hard-coded disappearing?
would it be better to have them in the unique map folder, to give them unique paths for each map?
- milo christiansen
- Regular
- Posts: 749
- Joined: 02 Jun 2009, 21:23
- Location: Perrinton Michigan
Re: Artifacts revisited
As for testing... They have only been tested in 2.3.8 skirmish Master will not load scripts in skirmish it seems and I don't have internet at homeFlail13 wrote:a few points about the scripts...
have they been tested in multiplayer?
should we be using crates with their hard-coded disappearing?
would it be better to have them in the unique map folder, to give them unique paths for each map?
As far as I know crates don't disappear unless you destroy them in script, at least they never did in my tests. This I tested in both 2.3.8 and Master.
As for unique paths, they are not needed because the mod data is loaded on-the-fly so you always get the right copy. This is how the new map/mod support works. The only way this would be a consideration is if you are using a version of warzone that does not support map/mods.
For some reason the script parser chokes on the dynamic placement scripts vlo
Here's the vlo:
Code: Select all
script "Artifacts-Dynamic.slo"
run
{
// Artifacts
crate FEATURESTAT "Crate"
ArtSnd SOUND "pcv352.ogg" //artifact sound
ExampleRes RESEARCHSTAT "R-Vehicle-Prop-Hover"
}
Code: Select all
--- Starting log ---
error |12:29:13: [eventSetContextVar] eventSetContextVar: Variable type mismatch (var type: 2009463936, data type: 29)
error |12:29:13: [eventSetContextVar] Assert in Warzone: ../../../../lib/script/event.c:760 (0), last script event: '<none>'
error |12:29:13: [scrv_error] VLO parse error: Set Value Failed for 0 at line 6, text: 'Crate'
fatal |12:29:13: [dataScriptLoadVals] Script Artifacts-Dynamic.vlo did not compile
error |12:29:13: [resLoadFile] resLoadFile: The load function for resource type "SCRIPTVAL" failed for file "Artifacts-Dynamic.vlo"
fatal |12:29:13: [resLoad] Failed to parse wrf/Artifacts-Dynamic.wrf
fatal |12:29:13: [startGameLoop] Shutting down after failure
At first I thought it was a cam vs sk/mp data problem but both versions of features.txt define a "Crate". I've done every thing I an think of but it still won't work.
- Attachments
-
- MP-SK Artifact Scripts.7z
- Ready to go artifact placement scripts, complete with test map and nonworking dynamic placement scripts :p
- (2.53 KiB) Downloaded 211 times
In general, if you see glowing, pulsating things in the game, you should click on them.
- Demigod Game Ganual
- Demigod Game Ganual