EnglishGermanFrenchRussianItalianSpanish
Log inRegister
 
[MOD] Miscellaneous IZ Combat Tweaks
Post new topic Reply to topic Goto page Previous  1, 2, 3 ... 88, 89, 90
View previous topic :: View next topic
Author Message
beaver1981





Joined: 22 May 2013
Posts: 54 on topic

Thank you for registering your game
PostPosted: Tue, 19. Dec 17, 12:58    Post subject: Reply with quote Print

Quote:
Sounds good!


-> Tested some changes again, not working really good. Could not implement a satisfying way to change behaviour if "this.ship.availableunits.{unitcategory.attack}.count == 0". First Jump works but ship gets stuck and doesn´t do anything Sad

Quote:
Rather than adding a resume, might be better to add your new distance stuff to just within the do_while since it's based on changing conditions? That way, you wouldn't have to do all that stuff between start and the do_while every cycle. After the series of break checks looks about right. But yeah, i never thought of changing distance thresholds depending on drone availability. Interesting!


I wan´t the changing of distance thresholds depending on drone availability to work dynamically so that script needs rechecks.

Don´t really know how to do that. Will have to look into that.
If you got a good idea I woul appreciate that.

Changed the check-condition to

Code:
<do_if value="this.ship.availableunits.{unitcategory.attack}.count gt 0 and this.ship.defencenpc.$config_attackenemies == 1">


since the original conditions for acquiring assault drone targets in the CES script are like this

Code:
<do_if value="this.ship.distanceto.{$enemies.{$i}} gt 7500m and this.ship.distanceto.{$enemies.{$i}} lt 35000m" chance="$DObaseskill">
                    <do_if value="@this.$config_attackenemies == 1 or this.ship.isplayerowned == false">
                      <add_to_group groupname="$wardronetargets" object="$enemies.{$i}" />
                    </do_if>


so I need a check on if thera are assault-drones and if the DO is configured to attack. I like to have that switch allowing a normal attack or attacking with assault drones.

If we could get this working I would like that you just update the CES edition. I would like to keep that modular so that it´s an option not a must have.

Back to top
View user's profile Send private message
w.evans





Joined: 18 Nov 2014
Posts: 2924 on topic

Thank you for registering your game
PostPosted: Tue, 19. Dec 17, 20:01    Post subject: Reply with quote Print

beaver1981 wrote:
I wan´t the changing of distance thresholds depending on drone availability to work dynamically so that script needs rechecks.

Yup. That's why i was suggesting you put it just inside the do_while, so drone availability would be checked every time the ship finishes a movement. Hm, would have to save the init numbers though so we could revert to those if the check fails.

Something like this. Right after:
Code:
<!--MICT: sometimes getting null targets.-->
<do_if value="not $target">
   <break/>
</do_if>


insert:
Code:
<do_if value="@this.ship.defencenpc.$config_attackenemies and this.ship.availableunits.{unitcategory.attack}.count gt 0">
   <do_if value="not $MICT_initbackup?">
      <set_value name="$MICT_initbackup" exact="[$MICT_MaxAimDist, $MICT_MinAimDist, $MICT_MaxJumpDist, $MICT_MinJumpDist, $MICT_MaxShortAimDist, $MICT_MinShortAimDist]"/>
   </do_if>
   <set_value name="$MICT_MaxAimDist" exact="15000m"/>
   <set_value name="$MICT_MinAimDist" exact="8000m"/>
   <set_value name="$MICT_MaxJumpDist" exact="15000m * (1.9f - ((this.skill.navigation + this.skill.morale)f / 10.0f))"/>
   <set_value name="$MICT_MinJumpDist" exact="15000m * (0.3f * (1.0f + (1.0f * ((this.skill.navigation + this.skill.morale)f / 10.0f))))"/>
   <set_value name="$MICT_MaxShortAimDist" exact="3570m * (2.0f - ((this.skill.navigation + this.skill.morale)f / 10.0f))" />
   <set_value name="$MICT_MinShortAimDist" exact="3570m * (0.1f * (1.0f + (1.0f * ((this.skill.navigation + this.skill.morale)f / 10.0f))))"/>
</do_if>
<do_elseif value="$MICT_initbackup?">
   <set_value name="$MICT_MaxAimDist" exact="$MICT_initbackup[1]"/>
   <set_value name="$MICT_MinAimDist" exact="$MICT_initbackup[2]"/>
   <set_value name="$MICT_MaxJumpDist" exact="$MICT_initbackup[3]"/>
   <set_value name="$MICT_MinJumpDist" exact="$MICT_initbackup[4]"/>
   <set_value name="$MICT_MaxShortAimDist" exact="$MICT_initbackup[5]"/>
   <set_value name="$MICT_MinShortAimDist" exact="$MICT_initbackup[6]"/>
</do_elseif>


beaver1981 wrote:
If we could get this working I would like that you just update the CES edition. I would like to keep that modular so that it´s an option not a must have.

No problem. Let me know when you're ready. i will be away from a computer starting for around a week starting on Thursday though, so might not be able to update until after. And i won't have any weekends next month, so can't do any heavy-duty testing until February.

.......
hm. about "MICT: sometimes getting null targets.", just figured out why. should update that check at some point.

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic Reply to topic Goto page Previous  1, 2, 3 ... 88, 89, 90
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
Control Panel
Login Data
The time now is Thu, 18. Jan 18, 17:49

All times are GMT + 2 Hours


Board Security

Copyright © EGOSOFT 1989-2018
Powered by phpBB © 2001, 2005 phpBB Group
Template created by Avatar & BurnIt!
Debug: page generation = 0.07381 seconds, sql queries = 16