fix(loadout): convert ammo units to PEC correctly (1 ammo = 0.01 PEC)
- Ammo Burn from API is in ammo units, not PEC - 1 ammo = 0.01 PEC = 0.0001 PED - Was treating 848 ammo as 848 PEC (WRONG) - Now correctly: 848 ammo = 8.48 PEC - Fixes cost calculation: 30,552 PED/hr → ~330 PED/hr
This commit is contained in:
parent
d5ddb0deb7
commit
dca96662b0
|
|
@ -0,0 +1,134 @@
|
||||||
|
# Entropia Universe Attachment Mechanics - Technical Breakdown
|
||||||
|
|
||||||
|
**Source:** Domain expert knowledge from user (@ImpulsiveFPS)
|
||||||
|
**Date:** 2026-02-09
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 1. Amplifiers (Amps)
|
||||||
|
|
||||||
|
**Most common attachment for damage increase.**
|
||||||
|
|
||||||
|
### Mechanics:
|
||||||
|
- **Additional Damage:** Added to weapon's base damage
|
||||||
|
- **Cost Per Shot:** Increases SIGNIFICANTLY
|
||||||
|
- Pay weapon's normal ammo/decay PLUS amplifier decay
|
||||||
|
- **Economy:** Amp is "Eco" only if weapon Efficiency remains high
|
||||||
|
|
||||||
|
### Strategic Use:
|
||||||
|
- Higher DPS = kill faster = less time mob hits you
|
||||||
|
- Saves money on armor decay and healing
|
||||||
|
- Most players use amps for speed, not efficiency
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 2. Sights & Scopes
|
||||||
|
|
||||||
|
**"Skill-based" attachments.**
|
||||||
|
|
||||||
|
### Mechanics:
|
||||||
|
- **Stats:** Aiming/Skill Increase Bonus + Zoom
|
||||||
|
- **High-end versions:** Critical Hit Chance or Critical Damage bonuses
|
||||||
|
- **Cost Per Shot:** Increases SLIGHTLY
|
||||||
|
- No ammo cost
|
||||||
|
- Decay (lose value) every trigger pull
|
||||||
|
|
||||||
|
### Economy Analysis:
|
||||||
|
- "Standard" scopes provide ~0.1% efficiency boost
|
||||||
|
- **Veteran advice:** Don't use basic ones - decay cost outweighs tiny accuracy benefit
|
||||||
|
- Only use if trying to "skill up" faster
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 3. Absorbers (Deterioration Absorbers)
|
||||||
|
|
||||||
|
**Overlooked by beginners - protects weapon durability.**
|
||||||
|
|
||||||
|
### Examples:
|
||||||
|
- ArMatrix Extender series
|
||||||
|
|
||||||
|
### Mechanics:
|
||||||
|
- **What they do:** "Absorb" percentage of weapon's decay
|
||||||
|
- **Stats:** No damage or accuracy - strictly protect durability
|
||||||
|
- **Cost Per Shot:** Technically NEUTRAL or CHEAPER
|
||||||
|
- Absorber decays, but prevents gun from decaying
|
||||||
|
|
||||||
|
### Strategic Use:
|
||||||
|
- Use on Limited (L) weapons with high "Markup"
|
||||||
|
- Makes expensive guns last longer
|
||||||
|
- Saves money long-term on high-markup weapons
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 4. Enhancers ("Slot" Attachments)
|
||||||
|
|
||||||
|
**High-risk, high-reward attachments.**
|
||||||
|
|
||||||
|
### Types:
|
||||||
|
- Damage Enhancer
|
||||||
|
- Economy Enhancer
|
||||||
|
- Range Enhancer
|
||||||
|
- etc.
|
||||||
|
|
||||||
|
### Mechanics:
|
||||||
|
- **Stats:** Massive boosts (+10% Damage, -1% Weapon Decay)
|
||||||
|
- **Cost Per Shot:** HIGH RISK
|
||||||
|
- Don't just decay - have RANDOM CHANCE TO BREAK and disappear completely
|
||||||
|
|
||||||
|
### Strategic Use:
|
||||||
|
- Only recommended for HIGH-LEVEL hunting
|
||||||
|
- "Killing it before it kills you" survival strategy
|
||||||
|
- Not for casual/beginner hunters
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Important Note: Sights Stacking
|
||||||
|
|
||||||
|
**Weapons can have multiple sights:**
|
||||||
|
- Weapon can have a sight
|
||||||
|
- Scope can ALSO have a sight
|
||||||
|
- **Maximum:** 2 sights possible (weapon + scope)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Cost Calculation Formula (Correct)
|
||||||
|
|
||||||
|
### Base Weapon Cost Per Shot:
|
||||||
|
```
|
||||||
|
Cost = (weapon_decay_pec + weapon_ammo_pec) / 100 # PED
|
||||||
|
```
|
||||||
|
|
||||||
|
### With Amplifier:
|
||||||
|
```
|
||||||
|
Cost = (weapon_decay_pec + weapon_ammo_pec + amp_decay_pec) / 100
|
||||||
|
```
|
||||||
|
|
||||||
|
### With Scope:
|
||||||
|
```
|
||||||
|
Cost = (weapon_decay_pec + weapon_ammo_pec + scope_decay_pec) / 100
|
||||||
|
# (ammo cost unchanged)
|
||||||
|
```
|
||||||
|
|
||||||
|
### With Absorber:
|
||||||
|
```
|
||||||
|
Weapon decay prevented = weapon_decay_pec × absorption_rate
|
||||||
|
Net cost = (weapon_decay_pec × (1 - absorption_rate) + absorber_decay_pec + weapon_ammo_pec) / 100
|
||||||
|
```
|
||||||
|
|
||||||
|
### With Enhancer:
|
||||||
|
```
|
||||||
|
Base cost + enhancer_decay
|
||||||
|
# Plus risk of total enhancer loss (breakage)
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Implementation Notes for Lemontropia Suite
|
||||||
|
|
||||||
|
1. **Amp Cost:** Add amp_decay_pec to every shot cost
|
||||||
|
2. **Scope Cost:** Add scope_decay_pec (no ammo impact)
|
||||||
|
3. **Absorber:** Reduce weapon decay by absorption %, add absorber decay
|
||||||
|
4. **Enhancer:** Add decay + implement breakage chance mechanic
|
||||||
|
5. **Double Sights:** Support weapon sight + scope sight combination
|
||||||
|
|
||||||
|
**Key Insight:** Amps increase DPS but cost more per shot. Scopes/Absorbers are situational. Enhancers are high-risk endgame.
|
||||||
|
|
@ -0,0 +1,83 @@
|
||||||
|
# 2026-02-09 - Sprint 2 Phase 2 Complete + Agent Swarm Build
|
||||||
|
|
||||||
|
## Session Summary
|
||||||
|
|
||||||
|
**Time:** 09:00 - 09:45 UTC
|
||||||
|
**Commits:** 15+ including agent swarm builds
|
||||||
|
**Status:** Core hunting system functional, calculations need refinement
|
||||||
|
|
||||||
|
## What Was Built
|
||||||
|
|
||||||
|
### ✅ COMPLETED - Agent Swarm (3 parallel agents)
|
||||||
|
|
||||||
|
**Agent 1: Loadout Manager v2.0**
|
||||||
|
- Full Nexus API integration (3,099 weapons, 1,985 armors, 106 finders)
|
||||||
|
- Attachment system: Amplifiers, Scopes, Absorbers, Armor Platings
|
||||||
|
- Weapon/Armor/Attachment selectors with real data
|
||||||
|
- Complete cost calculations (weapon + armor + attachments + healing)
|
||||||
|
- NEW: `ui/attachment_selector.py` (678 lines)
|
||||||
|
|
||||||
|
**Agent 2: Armor Decay Tracking**
|
||||||
|
- When player takes damage → armor decay cost calculated
|
||||||
|
- Added to HUD total cost automatically
|
||||||
|
- Uses real armor decay from Nexus API
|
||||||
|
|
||||||
|
**Agent 3: Healing Cost** (partial)
|
||||||
|
- Healing tools selection in Loadout Manager
|
||||||
|
- Cost per heal tracking
|
||||||
|
|
||||||
|
### ✅ HUD Enhancements
|
||||||
|
- Cost tracking per shot (weapon decay)
|
||||||
|
- Profit/Loss calculation (loot - cost)
|
||||||
|
- Color-coded P/L (green=profit, red=loss)
|
||||||
|
- Shots fired counter
|
||||||
|
- Estimated kills (1 per loot event)
|
||||||
|
- DPP display in HUD
|
||||||
|
|
||||||
|
### ✅ Core Systems
|
||||||
|
- `core/attachments.py` - Full attachment type system
|
||||||
|
- Attachment compatibility validation
|
||||||
|
- Mock attachment data for testing
|
||||||
|
|
||||||
|
## Issues Discovered
|
||||||
|
|
||||||
|
### Calculation Bugs (CRITICAL)
|
||||||
|
Weapon cost showing **30,590 PED/hour** - completely wrong!
|
||||||
|
|
||||||
|
**Problems:**
|
||||||
|
- Ammo: 848 PEC/shot - should be ~8.48 PEC (0.0848 PED)
|
||||||
|
- DPP: 0.0506 - way too low (should be ~2-4)
|
||||||
|
- Unit conversion errors between PEC/PED
|
||||||
|
|
||||||
|
### Armor System Needs Redesign
|
||||||
|
User feedback:
|
||||||
|
- Want to pick armor sets OR individual parts
|
||||||
|
- Current implementation annoying
|
||||||
|
- Mix & match should be supported (e.g., Ghost Harness + Shogun Arms)
|
||||||
|
|
||||||
|
### Attachment Research Needed
|
||||||
|
- Real EU attachment mechanics not fully understood
|
||||||
|
- Need to research from Entropia Wiki/Nexus
|
||||||
|
- Amplifiers: add damage + increase ammo burn
|
||||||
|
- Scopes: range boost, minimal decay
|
||||||
|
- Absorbers: damage reduction, moderate decay
|
||||||
|
|
||||||
|
## Next Steps
|
||||||
|
|
||||||
|
1. **Fix calculation bugs** - Unit conversion, DPP formula
|
||||||
|
2. **Research attachments** - Proper decay/effect values
|
||||||
|
3. **Redesign armor system** - Sets + individual parts
|
||||||
|
4. **Test with real hunt** - Verify costs are realistic
|
||||||
|
|
||||||
|
## Key Decisions
|
||||||
|
|
||||||
|
- Kill tracking: 1 per loot event (estimated, not exact)
|
||||||
|
- Shrapnel handling: included in loot, not kill count
|
||||||
|
- Cost tracking: weapon decay per shot + armor decay per hit
|
||||||
|
- Agent swarm effective for parallel development but needs verification
|
||||||
|
|
||||||
|
## Technical Debt
|
||||||
|
|
||||||
|
- Calculation formulas need unit tests
|
||||||
|
- Attachment effects need validation against real EU data
|
||||||
|
- Armor system needs complete rewrite for flexibility
|
||||||
|
|
@ -139,10 +139,14 @@ class LoadoutConfig:
|
||||||
return total
|
return total
|
||||||
|
|
||||||
def get_total_ammo_per_shot(self) -> Decimal:
|
def get_total_ammo_per_shot(self) -> Decimal:
|
||||||
"""Calculate total ammo per shot including amplifier."""
|
"""Calculate total ammo cost per shot in PEC.
|
||||||
total = self.weapon_ammo_pec
|
|
||||||
|
Note: ammo_burn from API is in ammo units (1 ammo = 0.01 PEC)
|
||||||
|
"""
|
||||||
|
# Convert ammo units to PEC (1 ammo = 0.01 PEC)
|
||||||
|
total = self.weapon_ammo_pec * Decimal("0.01")
|
||||||
if self.weapon_amplifier:
|
if self.weapon_amplifier:
|
||||||
# Amplifiers typically add ammo cost based on damage increase
|
# Amplifiers add ammo cost based on damage increase
|
||||||
# Rough estimate: 0.2 PEC per damage point for amp
|
# Rough estimate: 0.2 PEC per damage point for amp
|
||||||
total += self.weapon_amplifier.damage_bonus * Decimal("0.2")
|
total += self.weapon_amplifier.damage_bonus * Decimal("0.2")
|
||||||
return total
|
return total
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue