soundrts-1.4.1.1

1 view
Skip to first unread message

修君

unread,
Jul 7, 2025, 11:23:51 AMJul 7
to soundRTSChat
1.4.1.1
Improved Attribute Panel:
The attribute interface has been enhanced. When players open the attribute panel of a building or unit, they can now see more detailed attributes.
Moreover, some attributes provide interactive features. For example, the can_train attribute: when a player opens the barracks' attribute panel and browses to can_train, they can use the left/right arrow keys to cycle through trainable units, and press the Enter key to view that unit's attributes directly.
Attributes like skill and tech can also be explored in this detailed way. Similarly, the can_build field in a worker's attribute panel can be viewed using this method.
Ship Shore-Repair Feature Description
Feature Overview
A new ship shore-repair mechanic has been added, allowing workers on land to repair ships moored near the shore. A new parameter, can_repair_ships, has been introduced to specify which units can repair ships.
Latest Update: Buildings now also support the can_repair_ships parameter and can automatically repair damaged ships in adjacent water tiles!
New Parameter
can_repair_ships
Type: Integer
Default: 0 (repair not allowed)
Values:
1: Allowed to repair ships
0: Not allowed to repair ships
Applicable To: Worker units, Buildings
Usage Examples
Defining Worker Units in rules.txt
; Regular Worker - Must be explicitly set to repair ships
def peasant
class worker
can_repair_ships 1
; ... other attributes

; Professional Engineer - Can repair ships
def engineer
class worker
can_repair_ships 1
; ... other attributes

; Regular Soldier - Cannot repair ships by default (can omit this parameter)
def footman
class soldier
; can_repair_ships 0  ; Can be omitted, default is 0
; ... other attributes

; Construction Worker - Explicitly not allowed to repair ships
def builder
class worker
can_repair_ships 0
; ... other attributes
Defining Buildings in rules.txt
; Naval Base - Can automatically repair ships in adjacent waters
def naval_base
class building
can_repair_ships 1
; ... other attributes

; Dock - Automatically repairs docked ships
def dock
class building
can_repair_ships 1
; ... other attributes

; Regular Building - Cannot repair ships by default (can be omitted)
def townhall
class building
; can_repair_ships 0  ; Can be omitted, default is 0
; ... other attributes
Repair Preconditions
Conditions for Workers to Repair Ships
To successfully repair ships at the shore, all the following conditions must be met:
Ship Conditions:
Must be a water unit (airground_type water)
Must be repairable (is_repairable 1)
Ship HP is not at maximum (hp < hp_max)
Ship must be in water adjacent to land
Worker Conditions:
Worker must be on land near water
Worker must have building ability (can_build is not empty)
Worker must be allowed to repair ships (can_repair_ships 1)
Worker must have enough resources to pay repair costs
Position Conditions:
Worker and ship must be in adjacent areas
Ship’s water tile must be adjacent to land
Worker’s land tile must be adjacent to water
Conditions for Buildings to Auto-Repair Ships
Buildings will automatically repair damaged ships in adjacent water if the following are true:
Building Conditions:
Building must have can_repair_ships 1
Building must be fully constructed and operational (not under construction)
Ship Conditions:
Must be a water unit (airground_type water)
Must be repairable (is_repairable 1)
Ship HP is not at maximum (hp < hp_max)
Ship must be a friendly unit (including allies)
Position Conditions:
Ship must be in water adjacent to the building’s location
The water tile must border the land tile where the building sits
The distance at which workers can repair docked ships is 6, while buildings can repair docked ships at a distance of 8. Therefore, ships and workers need to be close enough to the shore to be repaired, and buildings also need to be positioned close enough to the shore. You need to press F8 to activate zoom mode for precise control of the ship’s coordinates.
This repair mechanism for docked ships is just an initial concept, and better mechanisms may be developed in the future.
Note:
This distance refers to repairing water units from land, not to repairing land units from land—the distance for land unit repairs remains unchanged.

In addition, many safety checks have been implemented. For example, ground units cannot enter water, including being unloaded by vehicles into water areas. Now, even if there is a path connecting land and water, there’s no need to worry about ground units accidentally entering the water and drowning. If a ship accidentally goes ashore, it is not allowed to block (other units).
If you would like this translation to be more concise or formal, feel free to specify!


game code.

Reply all
Reply to author
Forward
0 new messages