Author Topic: A short side-mission branch  (Read 9059 times)

Offline Vaendryl

Re: A short side-mission branch
« Reply #15 on: October 11, 2014, 07:31:08 am »
another way that is a bit hacky but should work is to use config.label_overrides.
you use this as a dict, so in a mod's init phase you can say something like: config.label_overrides['beachepisode'] = 'sidemission1', and in the label sidemission1 you delete this entry again en then manually jump to 'beachepisode'.

This will be really useful for my mod that I've been working on for how long? 3-5 months?

I expect this only works if a label is explicitly jumped to and not rolled onto from the previous label, so that's something to be careful about.

AI sucks

there are ways to play with the AI. you could write a custom function to handle the AI of a specific ship and you could overwrite the bound method that's inherited from the class with this function.

clicking the end turn button does some generic stuff and then runs the BM.enemy_AI() method. this loops over all the enemy ships and runs their ship.AI() method which in turns runs the ship.AI_basic_loop multiple times depending on circumstance.
you can write a replacement function and overwrite any of these on a case by case basis to really change how the game works. for example, during some init you write
Code: [Select]
def alternate_AI(enemy_ship):
    code
    return
and then you can do 2 things. either you create your very own new ship but overwrite the old method like so:
Code: [Select]
class new_ship(Battleship):
    def __init__(self):
         etc
    def AI(self):
        alternate_AI(self)
        return
or during ship init of an existing ship you can say something like:
Code: [Select]
create_ship(PACTmook(),(14,4))
enemy_ships[-1].AI = alternate_AI
you can even overwrite the BM.enemy_AI method to manually script every single action of the entire enemy phase to go as you please.
mind you, doing this is likely to mess with compatibility code that gets run which resets all classes to default, but it's something to consider.
(╯□)╯︵ uoıʇdǝɔxǝ
latest version: 7.2
RTFW
Mark 5:9

Offline Rhi

Re: A short side-mission branch
« Reply #16 on: October 13, 2014, 12:22:16 pm »
Figured I'd drop a short report on what we've discussed earlier.

Label override worked out perfectly, I've did a quick playthrough and didn't experience any issues whatsoever. This makes any kind of side-missions easy to integrate into whatever point of main storyline you want them to pop up(unless you have 2 or more using the same point to override, ofc). Coupled with the "planet entry" way(+its "store item" variant) this gives enough freedom to the modder with no necessity to override native game files. Yay.

I also did some AI tweaking for my needs going with your suggestions and they seem to be working alright as well. That said, I then managed to replicate all of the scripting via methods which are already available, heh. The things that actually limit you is the global nature of hate generation and the movement focus of AI as of the latest patch - that last one can be somewhat circumvented by toying with custom weapons and conditional changes to ship attributes, but it's still there.

Oh and the last thing, it was mentioned in some other thread, about giving player ships some AI control option. Would actually be nice if we had an easy method to place friendly ships under AI control on the field. Would've been fun to make something like Sunrider crashing into the part of Alliance/PACT battlegroups or escort mission where convoy is actually an independant force.

Offline Vaendryl

Re: A short side-mission branch
« Reply #17 on: October 13, 2014, 12:27:20 pm »
Figured I'd drop a short report on what we've discussed earlier.

Label override worked out perfectly, I've did a quick playthrough and didn't experience any issues whatsoever. This makes any kind of side-missions easy to integrate into whatever point of main storyline you want them to pop up(unless you have 2 or more using the same point to override, ofc). Coupled with the "planet entry" way(+its "store item" variant) this gives enough freedom to the modder with no necessity to override native game files. Yay.

I also did some AI tweaking for my needs going with your suggestions and they seem to be working alright as well. That said, I then managed to replicate all of the scripting via methods which are already available, heh. The things that actually limit you is the global nature of hate generation and the movement focus of AI as of the latest patch - that last one can be somewhat circumvented by toying with custom weapons and conditional changes to ship attributes, but it's still there.

Oh and the last thing, it was mentioned in some other thread, about giving player ships some AI control option. Would actually be nice if we had an easy method to place friendly ships under AI control on the field. Would've been fun to make something like Sunrider crashing into the part of Alliance/PACT battlegroups or escort mission where convoy is actually an independant force.

good to hear. I knew these things were possible but had never tested them myself. nice to know it works! :p
(╯□)╯︵ uoıʇdǝɔxǝ
latest version: 7.2
RTFW
Mark 5:9

Offline Inaho Rowe

Re: A short side-mission branch
« Reply #18 on: October 13, 2014, 06:21:18 pm »
nice mod! this mission is really good a well make side story a bit hard as i've lost asaga in like 2-3 turn on the second battle (the one you protect the destruction team) it was a bit funny seeing hp of unrider in skip mod going down so fastly XD i was like "whut 300?.....oh god and me that wanted to   keep my cp...."
anyway i just have a litle issues...at the end of the second battle my screen became black and i couldn't do anything unless accessing to the option ?so it is because i used the chapter load?

SPOIL
also so in the end if i understood they was really cera scientist?.....i dunno if i'll do this side mission in an actual full play even tough this is a strategical purpose i just can't bring myself to kill my own people XD maybe having a special win goals asking to kill all other unit? or a command choice? (or maybe there is an other way that i didn't find yet(since i've had accidently oversaved my save while the sceen was black i couldn't bring my self to retry XD))

anyway really a great mod !
PS: i've read that update erase the mod or something like that? is it also for the patch? because my game is back in "vanilla" ^^
-a new world with new depth-
"graduated from ryder pilot and enginering course
finnaly got to pilot my own ryder
still an long way until being a captain of my future assault carrier or even a commender of a litle fregate.....but i'm on my way to the top."

Offline Rhi

Re: A short side-mission branch
« Reply #19 on: October 14, 2014, 10:16:55 am »
These side-missions shouldn't affect the main story in any negative way(it's pretty much a totally independant line without any dependencies on other files at all), so the bugs you've described might've popped up due to loading some older-version save. Updates to the game shouldn't affect the mod once you have it installed, either.

Spoiler
You could think of those outpost inhabitants as of rogues/pirates of Ceran origin. Despite the fact that Sunrider could go nicely, transmit the valid codes and ask for docking permission to proceed with some kind of negotiations, the outpost still initiated hostilities, so nothing could be done about that. Regardless of Kayto's decision though, PACT managed to design and develop Assault Carriers at a short notice, so it's unknown if what he did there was really worth it or not :)

Offline Inaho Rowe

Re: A short side-mission branch
« Reply #20 on: October 14, 2014, 10:39:02 pm »
okay thanks well guess i'll have to wait for the next update to restart the game again with the new features and then finish this branch of side mission which are really great XD (is there a third batle? or was it the end?)
okay good to know i'll retry to install the decensored patch just in case but well this patch not really have that much of importance for me XD since i'm mostly interested in the well designed strategical turn by turn game :3
plus of cours the fact it's in a sf ,hvae godamn good music (wich shouldn't stop when turn change XD not necessary having only one but at least puting it in break and then when your turn come back making it play when it stopped) and the VN
well anyway to come back to the topics this mod is really great! hop to see more side mission in the futur^^

SPOIL
well even so....they may haved their own reason to do so i know it was only self defense...but...i...
well i wonder if they didn't already have disign some assault carrier but just didn't use it to keep it as a trumb card

or maybe they haved the plan through....hum hum....

well still it was worth it....i mean....one missile dock and 2 free torpedoes....beside i managed to have minimum loss so i gained a good amount of money ~~
by the way does the uppgrade count as if we did pay for it? or would we still could pay (for instance) 1500 to uppgrade it once more?
-a new world with new depth-
"graduated from ryder pilot and enginering course
finnaly got to pilot my own ryder
still an long way until being a captain of my future assault carrier or even a commender of a litle fregate.....but i'm on my way to the top."

Offline Rhi

Re: A short side-mission branch
« Reply #21 on: October 15, 2014, 03:52:51 am »
by the way does the uppgrade count as if we did pay for it? or would we still could pay (for instance) 1500 to uppgrade it once more?

Nope, I've given the bonus to the Sunrider's base stats, so the everyone gets the same $ value out of the upgrade.

Offline Inaho Rowe

Re: A short side-mission branch
« Reply #22 on: October 15, 2014, 03:04:24 pm »
good really good  more missile mouahahahah
-a new world with new depth-
"graduated from ryder pilot and enginering course
finnaly got to pilot my own ryder
still an long way until being a captain of my future assault carrier or even a commender of a litle fregate.....but i'm on my way to the top."

Offline Rhi

Re: A short side-mission branch
« Reply #23 on: October 16, 2014, 12:04:58 pm »
Alright, upon my current playthrough I've actually ran into an issue with the black screen on mission completion that was described earlier. Weird, didn't happen before that. Anyhow, I've fixed that and it should work now. If anyone runs into other issues, please post them here.

PS. Oh and yeah, got through it on hard - was previously wondering if I really overdid last mission, heh.
« Last Edit: October 16, 2014, 12:33:51 pm by Rhi »

Offline Inaho Rowe

Re: A short side-mission branch
« Reply #24 on: October 16, 2014, 04:05:21 pm »
aaaah nice ! thanks for the fix and work!
-a new world with new depth-
"graduated from ryder pilot and enginering course
finnaly got to pilot my own ryder
still an long way until being a captain of my future assault carrier or even a commender of a litle fregate.....but i'm on my way to the top."

Offline Drath

Re: A short side-mission branch
« Reply #25 on: April 02, 2015, 06:59:10 am »
Bit of a necro post but wanted to bump the thread as this mod is really elegantly done by Rhi, without needing to tamper with script.rpy. Played through 3 battles on Hard, v7.1a, and found them a blast to play. I liked that it ties up a few loose ends in terms of Sunrider's origins and fleshes out the pirates a bit more. Gameplay-wise its nice to give out a missile slot upgrade and 2 rockets for variety. The last battle in particular is fairly tight and you'll probably need those rockets to have a good chance of getting through it.

If you are looking for a few more battles to sink your teeth in, to smooth the difficulty spike for the escort mission, you'll probably like playing through this one.  :)

Offline Inaho Rowe

Re: A short side-mission branch
« Reply #26 on: July 20, 2015, 05:42:00 pm »
aaaaaah god damn it finnaly got to do this and finish these side mission ~~ and excuse me but
FUCK IT that was tiresome nervecracking but freaking awesome
i serriously shitted my pants at
SPOIL
the apparition of the carrier when i tought i had finnaly got the victory at side, then see it spawn and....i had sunrider at ~ 600
black jack at ~400
one battleship at half life and still 4-5 ryders and the missile frigate XD
but it was hell of worth it XD
-a new world with new depth-
"graduated from ryder pilot and enginering course
finnaly got to pilot my own ryder
still an long way until being a captain of my future assault carrier or even a commender of a litle fregate.....but i'm on my way to the top."