Unit replacement at each tech level - question -1 reply

Please wait...

Filo

.

50 XP

23rd August 2007

0 Uploads

776 Posts

0 Threads

#1 10 years ago

I coded in some new units which are Assault Frigate mk.1 and Victory SD mk.1, both are available at tech level 1. I also made their succesors buildable at tech level 2 and I wanted to use story sandbox files and make it replace the old one as the tech level changes. No problem with Victory because as we know on each tech level all imperial units appear at once. But what about Assault Frigates? What code should I use to make AF2 replace AF1 when its unlocked by slicer?




sixt6

GF Pwns Me!

50 XP

27th April 2008

0 Uploads

62 Posts

0 Threads

#2 10 years ago

look at the Z-95 headhunter code in rebel campaign




Sidious Invader

Dark Lord Of The Sith

50 XP

9th January 2007

0 Uploads

853 Posts

0 Threads

#3 10 years ago

It's one step more than the z-95 code.... STORY_TECH_LEVEL1STORY_TRIGGERBUILDABLE_UNITVictory_Mk2Victory_Mk1Tech_level_1 Param1 unlocks the Mk2, while locking the Mk1, but this only happens after the prereq is fufilled. In this case the event "tech_Level_1" which when tech is advanced to level 1.




Filo

.

50 XP

23rd August 2007

0 Uploads

776 Posts

0 Threads

#4 10 years ago

Sidious Invader;4398424It's one step more than the z-95 code.... STORY_TECH_LEVEL1STORY_TRIGGERBUILDABLE_UNITVictory_Mk2Victory_Mk1Tech_level_1 Param1 unlocks the Mk2, while locking the Mk1, but this only happens after the prereq is fufilled. In this case the event "tech_Level_1" which when tech is advanced to level 1.[/quote]

[quote=Filo;4398342]No problem with Victory because as we know on each tech level all imperial units appear at once.

:rolleyes:

People, I know it all. I ask what should I put in prereq to make AF1 disappear when the AF2 is unlocked (not when tech level upgrades)




Jedi_Lu

GF Pwns Me!

50 XP

12th October 2007

0 Uploads

55 Posts

0 Threads

#5 10 years ago

Ok ... its tricky:

Example: Planet Kuat with Victory_Mk2

than

STORY_ENTERKuatDroids_Team1Universal_Story_StartSTORY_GENERICslice_dialogSlicer_Droids_KuatSTORY_GENERICsliceBUILDABLE_UNITAssault_FrigatesSlice_Dialog_00

This is not tested! ;)

best regards Jedi Lu




Sidious Invader

Dark Lord Of The Sith

50 XP

9th January 2007

0 Uploads

853 Posts

0 Threads

#6 10 years ago

There is no trigger event for a tech becoming available, but take a look at techbuilding.xml. Try creating a new tech (Named AF upgrade) that does not advance the tech level, you'll see the xml tag for it. Then in the story scripting, use the "buildable_unit" code if build upgrade, then unlock mk2, lock mk1.




xanofar

Back from the dead!

50 XP

15th April 2008

0 Uploads

783 Posts

0 Threads

#7 10 years ago

*Has nothing to contribute, but has learned a great deal and excuses himself*




Filo

.

50 XP

23rd August 2007

0 Uploads

776 Posts

0 Threads

#8 10 years ago

Sidious Invader: Its not exactly what I want, upgrade which could be bought from build menu is something different than slicing in fact...

Jedi Lu: Oh yeah, its tricky. But I think I've understood it and I'm gonna try it- thx.