forked from Phobos-developers/Phobos
-
Notifications
You must be signed in to change notification settings - Fork 0
Distance calculation #56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Coronia
wants to merge
36
commits into
develop
Choose a base branch
from
distance-calculation
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+7,231
−4,557
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…hobos-developers#1725) - `ExpireWeapon.UseInvokerAsOwner` can be used to set the house and TechnoType that created the effect (e.g firer of the weapon that applied it) as the weapon's owner & invoker instead of the object the effect is attached to. - `RevengeWeapon.UseInvokerAsOwner` can be used to set the house and TechnoType that created the effect (e.g firer of the weapon that applied it) as the weapon's owner & invoker instead of the object the effect is attached to. - `ReflectDamage.UseInvokerAsOwner` can be used to set the house and TechnoType that created the effect (e.g firer of the weapon that applied it) as the reflected damage's owner & invoker instead of the object the effect is attached to. In `rulesmd.ini`: ```ini [SOMEATTACHEFFECT] ; AttachEffectType ExpireWeapon.UseInvokerAsOwner=false ; boolean RevengeWeapon.UseInvokerAsOwner=false ; boolean ReflectDamage.UseInvokerAsOwner=false ; boolean ```
…evelopers#1723) ### Allows refineries to use multiple ActiveAnim simultaneously - In vanilla, the refinery uses different ActiveAnims depending on the storage. You can now make it use multiple ActiveAnims simultaneously like any other building. In `artmd.ini`: ```ini [SOMEBUILDING] ; BuildingType Refinery.UseNormalActiveAnim=false ; boolean ```
- replace it with Type variable for Aircraft, Building, Infantry and Unit classes - replace Find(techno->GetTechnoType()) with Find(techno)->TypeExtData
…os-developers#1728) previous `Damage.DealtByInvoker` doesn't really apply to anim warhead, this PR makes it inline with anim weapon. Notice that this might change the behavior of anim weapon and warhead a bit, but I think this should be the correct way. Any other feedbacks and reviews are welcome `Damage.ApplyFirepowerMult` determines whether or not firepower modifiers from the animation's invoker are applied on the damage dealt from this animation, if exists
…hobos-developers#1729) In vanilla game, aircraft will always return to airport even it still has remain ammo and planning after target has been destroyed. For now, the aircraft will continue attack next planning target if it still has ammo.
- Fix `Spawner.LimitRange` - Fix `IronCurtainColor`, `ForceShieldColor` and `BerserkColor` - Remove unnecessary `pINI->GetSection(pSection)` judgments and their hooks. --------- Co-authored-by: NetsuNegi39 <[email protected]> Co-authored-by: Coronia <[email protected]>
- LaserTrail can now drawn as other behaviour like EBolt or RadBeam. - 激光轨迹现在可以绘制成电弧或辐射波的样式。 - You can also specific laser trail on attacheffect, the trail will disappear if attacheffect is expired. - 你也可以在AE上指定激光轨迹,这种激光轨迹将会在AE过期后消失。 [SOMETRAIL] ; LaserTrailType name DrawType=laser ; enumeration (laser | ebolt | radbeam) IsAlternateColor=false ; boolean Bolt.Color1= ; r, g, b Bolt.Disable1=false ; boolean Bolt.Color2= ; r, g, b Bolt.Disable2=false ; boolean Bolt.Color3= ; r, g, b Bolt.Disable3=false ; boolean Beam.Color= ; r, g, b Beam.Amplitude=40.0 ; double FadeDuration= ; integer, default 64 for laser, 17 for electric, 15 for radbeam [SOMEATTACHEFFECT] LaserTrail.Type= ; lasertrail type --------- Co-authored-by: CrimRecya <[email protected]> Co-authored-by: Coronia <[email protected]>
|
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. |
split from Phobos-developers#1568. This one is a bit controversial so I'd pull this alone for test and review - instead of selecting weapon for every bullet, used the fixed value from `Interceptor.Weapon` once and for all - added a RearmTimer check for the interceptor process
- Now, the original `DebrisMaximums` can be used in conjunction with new
`DebrisMinimums` to limit the quantity of `DebrisTypes` when
`DebrisTypes.Limit` is enabled.
- The default value of `DebrisTypes.Limit` is whether the number of
`DebrisMaximums` is greater than (not equal to) 1 (for compatibility
reasons).
In `rulesmd.ini`:
```ini
[SOMETECHNO] ; TechnoType
DebrisTypes.Limit= ; boolean
DebrisMaximums= ; List of integers
DebrisMinimums= ; List of integers
[SOMEWARHEAD] ; WarheadType
DebrisTypes.Limit= ; boolean
DebrisMaximums= ; List of integers
DebrisMinimums= ; List of integers
```
```{hint}
How to generate `DebrisTypes` in the game:
- Generate the total number of debris through `MaxDebris` and `MinDebris` first.
- Traverse `DebrisTypes` and limit the quantity range through `DebrisMaximums` and `DebrisMinimums`.
- When the number of generated debris will exceeds the total number, limit the quantity and end the traversal.
- When the number of debris generated after a single traversal is not enough to exceed the total number, it will end if `DebrisTypes.Limit` is enabled, otherwise the traversal will restart like vanilla game do.
```
86b3be6 to
6cc5085
Compare
### Attack move - behavior when target acquired
- Now you can make attacking moving units stop moving when they spot an
enemy using `AttackMove.StopWhenTargetAcquired`. This is more like the
attack move behavior in starcraft and warcraft.
- This function is used to prevent units from charging forward and
taking on more damage.
- You can also make them move towards the spotted target using
`AttackMove.PursuitTarget`.
- This function is used for close range units like ZEP.
In `rulesmd.ini`:
```ini
[General]
AttackMove.StopWhenTargetAcquired= ; boolean
[SOMETECHNO] ; TechnoType
AttackMove.StopWhenTargetAcquired= ; boolean, default to [General] -> AttackMove.StopWhenTargetAcquired if set, inverse of OpportunityFire otherwise.
AttackMove.PursuitTarget= ; boolean
```
```{note}
1. Many units would have stopped when they found an enemy. This behavior is independent of `AttackMove.StopWhenTargetAcquired`.
2. Some units (f.ex. jumpjets) will not fire correctly under the vanilla attack move. The exact reason is not clear, but this feature can fix this problem.
3. Jumpjets with `AttackMove.StopWhenTargetAcquired=true` will stop immediatly and not scatter to a cell. This is designed for practical reason.
```
### Attack move - follow
- Now you can have some units follow surrounding units when executing an
attack move. The following behavior is equivalent to the behavior when
using `ctrl + alt`.
- Use `AttackMove.Follow.IncludeAir` to determine whether the follower
will choose an air unit as a follow target.
- This function should be useful for auxiliary units such as medics and
repair drones.
- We have made additional optimizations to the followed target selection
algorithm to make this function more practical.
In `rulesmd.ini`:
```ini
[SOMETECHNO] ; TechnoType
AttackMove.Follow=false ; boolean
AttackMove.Follow.IncludeAir=false ; boolean
```
### Attack move - without weapon
- In vanilla, a unit without weapon is not allowed to attack move. Now
you can disable this hardcoded behavior using
`AttackMove.IgnoreWeaponCheck=true`.
- Unarmed units of course cannot actually execute attack moves. This
feature is to prevent the attack move pointer from being disabled when
you select unarmed units and other units at the same time.
In `rulesmd.ini`:
```ini
[General]
AttackMove.IgnoreWeaponCheck=false ; boolean
```
---------
Co-authored-by: Coronia <[email protected]>
Co-authored-by: CrimRecya <[email protected]>
- `Grounded` has been abandoned, you can now use `GroundShape` to specific a image which always draw on ground, it will only draw when techno is in air if set `Ground.AlwaysDraw=false`, this also affect on `GroundLine`. - `Grounded` 已经被废弃了,你现在可以通过 `GroundShape` 指定一个始终绘制在地面的图像,若 `Ground.AlwaysDraw=false` ,那么它只会在单位位于空中时绘制,这也影响 `GroundLine` 的绘制。 - If `GroundLine=true` , the game will draw a line from techno's position to its vertical projection, `GroundLine.Dashed=true` means the projection line is a dashed line. - 若 `GroundLine=true` ,那么游戏将会绘制一条从单位的位置到其垂直投影的线,`GroundLine.Dashed=true` 意味着投影线为虚线。 In `rulesmd.ini`: ```ini [SOMESELECTBOXTYPE] ; Select box Type name GroundShape= ; filename with .shp extension GroundPalette=palette.pal ; filename with .pal extension GroundFrames= ; List of integer, default 1,1,1 for infantry, 0,0,0 for vehicle and aircraft GroundOffset=0,0 ; integers - horizontal, vertical Ground.AlwaysDraw=true ; boolean GroundLine=false ; boolean GroundLineColor=0,255,0 ; R, G, B GroundLineColor.ConditionYellow= ; R, G, B GroundLineColor.ConditionRed= ; R, G, B GroundLine.Dashed=false ; boolean ```  --------- Co-authored-by: CrimRecya <[email protected]>
 You are free to decide whether to use Weapon x or not, instead of passively using Primary/secondary. 您可以自由决定是否启动WeaponX,而不是只能使用主/副武器。 - TechnoType reads `WeaponX` as their weapon when `MultiWeapon=yes`, be careful not to forget `WeaponCount`. `MultiWeapon=yes`时会读取`WeaponX`作为他们的武器,注意不要忘记了`WeaponCount`。 - `MultiWeapon.IsSecondary` can only be used by infantry, who will play the animation `SecondaryFire` when using these weapons. `MultiWeapon.IsSecondary`只能用于步兵,使用这些武器时步兵会播放`SecondaryFire`。 - `MultiWeapon.SelectCount` determines the number of weapons that can be selected. The lower the number the better the performance. The default is 2. `MultiWeapon.SelectCount`决定可选择的武器数量。数量越少性能越好。默认为 2。 In `rulesmd.ini`: ```ini [SOMETECHNO] ; TechnoType MultiWeapon= ; boolean MultiWeapon.IsSecondary= ; List of integers MultiWeapon.SelectCount= ; integer ```
This is a supplement for Phobos-developers#1695. With multiple weapons being set, you can use `ForceWeapon` to enable them when attacking different targets. This pull request is a basic one that should be enough for many cases - A series of tags can force specified weapons based on the target's type. - `ForceWeapon.Naval.Units` forces specified weapon to be used against `Naval=yes` units. Taking priority to `ForceWeapon.Units`. - If `ForceWeapon.Defenses` is enabled, it'll be used if the target is a building with `BuildCat=Combat`. Otherwise it'll follow `ForceWeapon.Buildings`, if enabled. - `ForceWeapon.Infantry/Units/Aircraft` can be applied to both ground and air target if `ForceAAWeapon.Infantry/Units/Aircraft` is not set. - `ForceAAWeapon.Infantry/Units/Aircraft` do the same things but only for air target. Taking priority to `ForceWeapon.Infantry/Units/Naval.Units/Aircraft`, which means that they can only be applied to ground target when they're both set. In `rulesmd.ini`: ```ini [SOMETECHNO] ; TechnoType ForceWeapon.Buildings=-1 ; integer, -1 to disable ForceWeapon.Defenses=-1 ; integer, -1 to disable ForceWeapon.Infantry=-1 ; integer, -1 to disable ForceWeapon.Naval.Units=-1 ; integer, -1 to disable ForceWeapon.Units=-1 ; integer, -1 to disable ForceWeapon.Aircraft=-1 ; integer, -1 to disable ForceAAWeapon.Infantry=-1 ; integer, -1 to disable ForceAAWeapon.Units=-1 ; integer, -1 to disable ForceAAWeapon.Aircraft=-1 ; integer, -1 to disable ```
…or building target (Phobos-developers#1739) To verify the patch: 1. Set `OpenToppedWarpDistance` the same as CLEG's weapon range. Build a BFRT with no range bonus and a CLEG. 2. In vanilla, it will not warp big building targets (like a war factory) correctly on the edge distance. 3. With this fix, it can always warp the targets they fired at.
…een (Phobos-developers#1737) - Now you can set `MessageApplyHoverState` to true,to make the upper left messages not disappear while mouse hovering over the top of display area. - You can also let task subtitles (created by trigger 11) to display directly in the middle area of the screen instead of the upper left corner, with a semi transparent background, by setting `MessageDisplayInCenter` to true. - When the mouse hovers over the subtitle area (simply judged as a rectangle), its opacity will increase and it will not disappear during this period. In `RA2MD.INI`: ```ini [Phobos] MessageApplyHoverState=false ; boolean MessageDisplayInCenter=false ; boolean ``` --- I'm not sure if there is a better implementation, but it's the simplest implementation that comes to my mind.
- Adjust Damage.IsDealtByInvoker=true code path fallbacks for house dealing damage: InvokerHouse -> invoker's owner -> anim owner -> fallbacks mentioned in second bullet - Restore fallback for house dealing damage to use owner objects (attachee) or parent building's owning house if available, separately from invoker logic - Clarify some of the behaviour in docs
…ers#1742) - Fix an issue that `MovementZone=Fly` harvesters can not be able to enter refinery buildings manually. - Fix an issue that jumpjet harvester cannot automatically go mining when leaving the weapons factory. - Fix an issue that jumpjet harvester will overlap when manually entering refinery buildings and cause game crashes. --- How vanilla jumpjet harvester can crash the game: Manually command multiple jumpjet harvester to return a refinery building. When the following jumpjets start to land and overlap on the ground, it will immediately get a fatal error. --- PS: Hook in 0x7043B9, 0x73B0C5 and 0x7410D6 can also solve the problem, but I don't want to do it. The current solution should have already solved the problem from the root.
5b96537 to
9486c50
Compare
9486c50 to
67cdb38
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.