Phobos icon indicating copy to clipboard operation
Phobos copied to clipboard

Ported `GiftBox` for Phobos

Open Otamaa opened this issue 4 years ago • 5 comments

Original Author : ChrisLV-CN https://github.com/ChrisLv-CN/PatcherExtension/blob/main/MyExtension/GiftBox.cs

This is not `TypeConversion` thing , there is no stat `Sync` from parent handled except `Destination` and `Focus` !

No detail documentation yet ! Tags: In rulesmd.ini:

[SOMETECHNO]
GiftBox.Types=;List TechnoType 
GiftBox.Nums=;List integer , Amount each Types will be created
GiftBox.Remove=;bool, Remove this Techno after creating Gifbox Types
GiftBox.Destroy=;bool, Destroy this Techno  after creating Gifbox Types
GiftBox.Delay=;integer , Giftbox Delay
GiftBox.RandomDelay=;integer (Min,Max) , Giftbox Random delay 
GiftBox.CellRandomRange=;integer 
GiftBox.EmptyCell=;bool
GiftBox.RandomType=;bool , Create random Types instead of all Types on the list 

Otamaa avatar Aug 22 '21 17:08 Otamaa

Nightly build for this pull request:

github-actions[bot] avatar Aug 22 '21 17:08 github-actions[bot]

Some wishlists, not important: Some type of auto scatter a tag for auto selection of new unit(s) if giftbox was selected

When using "GiftBox.Destroy=" on infantry, they do not appear to actually be killed but rather just remove (Terrorists do not give off explosion). The differences between destroy and remove seems to be whether they follow the walking orders from giftbox or not. For units, it works as intended and in both cases they follow previous orders.

Infantry inside Bioreactors do not appear to keep track of delay. Infantry cannot seem to convert to structures, did not know if this was by design or not, but they tend to disappear because of it

Infantry, when constructed, seem to walk into the cell of a converted infantry type without care. This is regardless if the infantry type is also converting to a new infantry or not. Having an GI walk to the rally point, convert to Brute, and then a GGI walk to same rally point and never convert will cause GGI to walk right on top of the Brute. Note I do not see a difference even if there's one Brute or ten, just that three GGI causes the cell to be full so he walks to the next.

When using this on SLAV types, they come out of the slave miner as expected and, even when converted to a new infantry, they travel to where the ore the SLAV was walking towards and then stand there. They continue to walk to destination regardless if removed or destroyed, in spite the common pattern from other scenarios with infantry where remove causes them to stop dead in their tracks. If delay is zero, the infantry simply exits the slave miner and then stops, not walking towards ore (probably because slaves do not have a destination set until finally exiting slave miner).

[SLAV] ... Sight=5 ;!! ... GiftBox.Types=SLAV GiftBox.Nums=1 ;GiftBox.Remove=yes GiftBox.Destroy=yes;bool, Destroy this Techno after creating Gifbox Types GiftBox.Delay=50;integer , Giftbox Delay

Slaves spawn as usual from slave miner, then stop at Ore not mining due to convert to a non enslaved SLAV. Works as expected. I do notice that, unlike tests with terrorists earlier, Slaves always go to last order given, even if it was their previous giftbox's order. Newly spawned slaves follows old orders.

Swapping to GiftBox.Remove:

GiftBox.Types=SLAV GiftBox.Nums=1 GiftBox.Remove=yes ;GiftBox.Destroy=yes;bool, Destroy this Techno after creating Gifbox Types GiftBox.Delay=50;integer , Giftbox Delay

I notice no changes. Slaves follow last order given.

I notice that the SLAV has no sight in shroud however in both cases when being removed or "destroyed". Increasing the Delay to 500 fixes this.

Giftbox with jumpjets:

Insant transforms from units that concert into jumpjet work as expect, the rocketeer starts on the ground and flies of barracks Transforms that have a delay seem to stop infantry from walking towards their location depending on if Destroy or Remove is used. Remove causes them to stop in their tracks.

Rocketeers that convert to GIs work as expected, the GI stands in the air until ordered to move. Gis that convert to Rocketeers work as expected, the Rocketeer stands on the ground until ordered to move. GIs deployed before convert does not negatively impact the jumpjets.

Giftbox with attackdogs:

When giving attack dogs a larger range and slower projectile speed, it can be observed that their delay isn't counted any longer. When given the attack dogs the ability to attack vehicles, their delay is also not counted. This applies to remove or destroy.

Giftbox With Units:

Work as expected, they continue to follow the orders given to the previous unit regardless if removed or destroyed. Destroyed actually causes them to blow up with the explosion animation taking place.

Giftbox with Battlefortresses They work as expected. However, infantry in original Battlefortress disappear and are lost with new battlefortress. -Infantry do not spawn even with the battlefortress being destroyed rather than removed, even with: RookiePassengerChance= 100 Survivor.VeteranPassengerChance=100 Survivor.ElitePassengerChance=100

Infantry are unable to enter battlefortresses that are spawned this way, regardless if the previous one had infantry inside it or not, regardless if the previous unit was a battlefortress or not.

Giftbox with slave miner When destroyed or removed, slaves go neutral, even if the SMIN turns into another SMIN

I will test Units more thoroughly next. This was primarily for infantry. Let me know if there's any questions or tests I should do, or if there's anything else I should have in mind.

RexDraco avatar Nov 15 '21 23:11 RexDraco

GiftBox is a duplicate of Kratos, and I've received reports that Kratos' GiftBox.RandomDelay doesn't work, probably because of a conflict. Maybe need a new name.

ChrisLv-CN avatar Jul 30 '22 01:07 ChrisLv-CN

Nightly build for this pull request:

This comment is automatic and is meant to allow guests to get latest nightly builds for this pull request without registering. It is updated on every successful build.

github-actions[bot] avatar Jul 08 '23 15:07 github-actions[bot]

[!IMPORTANT]

Auto Review Skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository.

To trigger a single review, invoke the @coderabbitai review command.

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share

Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit-tests for this file.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit tests for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository from git and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

coderabbitai[bot] avatar Jan 28 '24 18:01 coderabbitai[bot]