Giter Site home page Giter Site logo

secsome / fa2sp Goto Github PK

View Code? Open in Web Editor NEW
67.0 5.0 16.0 27.77 MB

C&C Red Alert 2: Yuri's Revenge Map Editor : Final Alert 2 extension

License: GNU Affero General Public License v3.0

C++ 96.71% C 3.29%
dll reverse-engineering red-alert-2 yuris-revenge syringe mapeditor injection

fa2sp's Introduction

Github All Releases Workflow license

NOTICE: As EA has released the source code of FA2, this project will be no longer maintained, I will work on migrating features based on the source code.

FA2sp

...is an engine extension project launched by secsome and aimed at providing a set of new features and fixes for FinalAlert2 based on FA2pp and Syringe to allow injecting code.

While FA2sp is independent of FA2Ext by AlexB, you cannot use FA2sp with using FA2Ext.

Currently, FA2sp uses Visual Studio 2022 (v143) with /std:c++20 to build the lastest versions.

Due to the limited energy of developers, starting from version 1.6.0, FA2sp will no longer provide support for any version other than Yuri's Revenge 1.01 and mods based on it. Please understand.

You can also try the other modern map editors launched by the community, for example, World Altering Editor .

Downloads

You can choose one of the following:

Changelog

You can check the full changelog here.

Document

You can check the document here.

fa2sp's People

Contributors

chloridep avatar loritas avatar mapleeve avatar secsome avatar starkku avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

fa2sp's Issues

Ore/Gem patch money Counter

Working similarly to the copy function, allow tiles to be selected and have a separate string (which only appears whilst using this) to show how much money is in the selected area, to save people using calculators or mentally on competitive maps.

fa2 crashes when trying to use trigger action 71 and 72

as stated in the title, fa2 simply crashes whenever the ambient light related trigger actions 71 or 72 are used. to recreate the crash, simply open a new map, make a new trigger, and switch the trigger action number to 71 or 72.

外部编辑提示异常问题

162的新功能,外部编辑地图文件后,编辑器会产生提示框提醒作者。
但是这个功能有一个问题,那就是在没有任何外部编辑的情况下,它也有极低的概率弹出。
每一次出现这种情况都是在手动保存地图时。

Disable redundant global AI trigger checkbox at map creation wizard

When creating a new map, there's an option to enable global AI triggers for the map. Selecting the option results in every global AI trigger to be listed and enabled in the map's [AITriggerTypesEnable] section. However, this is redundant. Global AI triggers should only be listed in this section when they are to be disabled for the map.

For more information, check ModEnc on AITriggerTypesEnable

FSP Enable Global AI Triggers Checkbox

Example from FSP. In FA2 the text is slightly different, but the logic remains the same.

地编显示矿量与实际游戏内不符

首先矿量应该是和一格矿周围8个格子有没有矿相关,因此应该是有9个等级,以原版的黄金矿为例
地编显示的9个等级的矿量为 25 50 100 125 175 200 225 275 300
游戏内实际9个等级的矿量为 0 25 75 100 150 175 200 250 275
每个等级相差25矿,游戏内周围8格都没有矿的一格杂矿实际矿车采了没钱
所以导致冰天中矿地编显示67000,实际游戏60600,相差128x25x2,(冰天中矿占128格)

Infantry cell spot issues

InfantryTypes can exist at 5 different cell spots (also called "subcells") within a cell. These spots use values 0-4, encoded as the 6th infantry parameter (see code below). Unfortunately, FA2 doesn't register infantry at the last spot (spot value 4). Infantry at this spot are invisible in the editor and cannot be selected. This is especially problematic when editing vanilla maps, as they sometimes contain infantry at these spots.

In addition, when placing infantry in a cell in FA2, they are placed at spots 0-2, not in 2-4 as seems to be intended. In vanilla maps, infantry are never placed at spots 0-1, probably due to how they overlap at the cell center.

Example map code:

[Infantry]
0=Neutral,E1,256,82,87,4,Guard,64,None,0,-1,0,1,0

The number 4 is the cell spot parameter.

For more information on cell spots, see ModEnc.

关于FA2SP闪退的问题

打开FA2SP,新建一个地图,鼠标移至地表上地编即闪退
而原版FA2不存在这个问题

关于建筑栏目的分类归纳失效

在1.6.1Ver中这些归纳分类是生效的,如盟军建筑、苏军建筑、尤里建筑、科技建筑、灯光建筑、地标建筑等,但在1.6.3Ver中并没有生效
QQ截图20231202233512

Map midpoint axis lines

Introducing a new Layer which makes a vertical and horizontal line which intercepts in the middle of the map

the middle of the map should refer to the visible map area OR the full map, i recommend allowing both, especially for expanding maps

This means mappers can achieve symmetry without having to draw water/walls or other placemarkers manually like this...

Maybe even allow a function which segments the map into sections (x section x and y sections)

option to save maps as .map

most map makers these days write maps to be used over the cncnet client, which stupidly enough only reads .map extension maps. this leads to the weird workflow of saving a map as .yrm or .mpr, then opening the map in a text editor, then saving the map with a .map file extension. adding the option to save maps with a .map file extension from the editor would save a lot of headache.

Request to make the Oblists cumulative somehow

I have a number of assets that could be grouped using the *Oblist method in fadata.ini with different filenames. Currently FA2sp only supports a single filemask for a group/sub-category, and I request this be changed.

I don't have a preference for specific way to do this, if a new entry just directed back to the same Oblist used by something else, that would be enough for me.
image

If however you want to change the ini syntax, so the Oblist comes first and the filemasks are a comma-separated list instead, that's fine too.

Translatable theater names

imagen
Will be possible to unlink these strings for translations?
Currently if you change the names of the Dropdown button with a Hex editor the map Theater will use that new string making the map unplayable.

For those with custom theaters it can be useful.

Small Tile Placement UI Size

There seems to be too little space given to the "Tile Placement" UI menu, which seems to cut some of the text.

See attached image.
image

Correct UI spacing:
image

tunnel drawer optimizations

final alert 2 has a tunnel drawer feature that was meant to let mappers make and use the tunnel logic introduced in TS, the tunnels also being usable by mods with terrain expansions; however, the tunnel drawer feature has a slight malfunction in generating the code for the tunnels that renders the feature non-working. fixing the tunnel drawer would be a wonderful quality of life improvement.

the error in the tunnel drawer's output is described in this ppmforum post in more detail
https://ppmforums.com/topic-42008/finalsun-tunnel-fixer/

无法在副屏编辑地图

如题,具体情况为为以下几种(以下情况均出现在地编窗口处于非主屏幕的情况下):

情况一:如果地编在副屏上打开地图,会无法显示,如下图:
01

继续上述步骤进行操作,将地编拖入主屏幕,会正常显示地图,如图所示:
image

再次将地编窗口拖入至副屏,仍然无法正常显示,并且在跨越屏幕拖拽时会概率性崩溃,如图所示:
02

情况二:在主屏幕正常打开地编载入地图后,将窗口拖拽至副屏,拖拽过程中地编崩溃,如图所示(屏幕上下错开是为了鼠标在右上角点X关闭窗口时不会跑到副屏):
03

BrowserRedraw.GuessMode seems buggy, even where the code is more than explicitly clear

BrowserRedraw.GuessMode=0 is what I'm referencing specifically. Though just after I started writing this I may have stumbled across the cause, which is still a bug, but more oblique. Mode 0 using prerequisite... this is the key.

Ok so the main point here is that more than a dozen of my side-specific units are grouped into the "Other" category instead of Allied/Soviet where they should be. And it appears the common factor is that these units all use the generic prerequisites defined under [General], but importantly I'm not using them the same way as the original rules. Namely the change is that PrerequisiteTech and PrerequisiteFactory are not pairs of values for opposing sides, but rather alternates for the same sides. So what I think is happening is FA2sp is assuming the generic prerequisite means it belongs to both sides, rather than considering the sides of the buildings within them, and if no other 'tie breaker' building is found in the Prerequisite= line, then it goes to Other.

image
image

I assume this can be recitified just by resolving the contents of the generic prerequisites to actual buildings, and using that for determination.

FA2 won't load override art from ecache for SNOW theater only?

Example image of the art properly substituting in URBAN & TEMPERATE but not on SNOW maps:
https://www.ppmforums.com/files/theaterglitch_751.jpg

All the building art is in the same mix, so permissions or corruption is not the issue, nor is it related to any particular filename. Likewise putting the art into an expand.mix instead of ecache.mix changes nothing.

This only occurs for override buildings that use the same names as in the original ra2.mix, it doesn't happen if the art is renamed via Image=xxxx for the modified building. In the cases where the building had no snowy art, and otherwise requires no change, it saves space to just include the overriding snow art, and thus the name has to be kept original.

It would seem to be a loading priority issue, one where theater rules are applied after the original defined name is loaded.

Update the rendering pass to show damage and rubble frames for buildings based on health

The damage frame is probably the easier of the two to implement, but the rubble frame displaying on zero health would really help when making a map. Westwood did include a number of rubble tiles in the URBAN tileset, but most of these were just placeholders and totally inappropriate to use in a real map. Using the real rubble also allows choosing among hundreds of buildings for one with suitable rubble for the occasion.

Rubble frames don't block unit movement, so they can be a very useful decoration that doesn't obstruct the AI or pathfinding. I could also see this update making it a lot easier to create destroyed/post-apocalyptic cities.

OverlayTypes float 15px higher than they should, except walls/rocks/tib...

The drawing center of overlays is inconsistent based on what category they fall into, but all of them should be displayed the same. just like terrain the center of the canvas should be on the center of the cell, not drawn like a building where it's the top corner of the cell.

Obviously I don't know how this is coded, whether there's an override routine or offset applied selectively, but it makes previewing (some) railroad tracks and non-rock debris difficult.
image

Lighting menu changes don't get reset between map loads

See linked image. Setting the lighting choice in the menu, in the example to the "Lightning Storm" option, and then loading a new map, will screw up all the lighting settings used by the menu in the new map. It does not alter the code in the map, as in refering to the Edit->Lighting all values are correct, but it means choosing "None" or "Normal" doesn't fix things, it seems to stay broken for the entire session.

https://i.imgur.com/6tMEBL9.jpg

修修弹框

小射修修,复制结果复制生成第十个结果的时候很容易弹框

Severe crash directly when previewing large buildings in 1.6.X Version

This error maybe only occur in FA2sp 1.6.X (this situation did not occur in FA2sp 1.5.2 earlier or fa2ext)

At present, it can be concluded that it is a new bug in 1.6.1.

When the Width of the map is equal to or even greater than the Height of the map, and the width and height are equal to or greater than 44, selecting a large Foundation building such as CAOUTP (科技前哨站) or CATHOSP (科技医院) will cause an error when the mouse crosses the bottom right corner of the map.

If the user uses "Shift+drag" instead of previewing and drops a large building to the bottom right corner, the ground editor crashes instantly and saves fcrash_backup.map when "save"(救) map, this error will be brought to the backup map, which will result in an error every time you use FA2sp to open this map unless the last building is deleted in the [Structures] section.

We can try to reproduce this error, should be previewing CATHOSP in the bottom right corner of the map when both the length and width of the map are equal to 45.

The error dialog may appear later. If there are no dialog, you can try changing the map size. This also proves that this bug is a memory issue.

I suspect that the map buffer was too small when creating buffer zone, and a corner of a large building exceeded that memory, causing the compilation to crash.

I did not test the situation inside the game. When entering the game, according to WW's characteristic, there may be internal errors (XD

Money On the Map 数值莫名增加的问题

其实原版就有,可不可以试着修复一下?

步骤:首先在地上摆一堆矿,然后用"Erase Overlay"擦除矿,再按ctrl+z撤销擦除。

反复多次执行后你会发现明明矿明明就那些,数值却大幅增加,非常神奇。

Trigger Painter

Currently, if you need to attach a trigger to multiple structures/vehicles/infantry you need to do it manually either through the map editor or through ini editing (if you have done it in a suitable order). Both of these methods are very time consuming.

My suggestion is to add a tool which allows you to paint triggers onto units (similar to the owner section)
it also allows for coops and challenges to be made easily, as hours of clicking and applying triggers are saved (especially on walls 😁

Issues reloading / loading maps [develop branch, lighting preview-related]

This currently only really applies to the develop branch as only it contains the commit that introduced this issue which is the introduction of the experimental lighting preview.

Attempting to load another map, or reload the current map after first one results in buildings with Palette being drawn with corrupted palette (the results are not same every time). Other types of objects seem to be fine, however.

lightingpals

Attempting to load / reload again after that will often lead to the program crashing, have not pinpointed exact conditions required for this to occur but seems to depend on contents of the map being loaded.

Files for the crash:
except.txt
extcrashdump.dmp

Wrong [Preview] Size placed

In the latest FA2SP 1.5.0, if you save a new map, the ME will not save:

[Preview]

tag properly.

IMO it saves Size=X,X,X,X under the bottom of [PreviewPack] tag, and will cause some issue.

expanded slope functionality

another major obstacle for terrain makers and mappers is that there is no way to indicate to FA2 that a terrain set is a slope set, resulting in map makers having to place every angle of every slope by hand. expanding slope logic so that it can be applied to terrain sets (in the corresponding theater's ini, ideally) would help diversify maps a great deal

worth noting is that the newurban theater already does this. it seems that newurban has been hardcoded to apply slope logic to both the grass and urban pavement terrain types.

地编会补Name和Owner

用记事本在地图里写入单位ini然后地编打开他会自个补齐没写的Name和Owner然后出问题。
比如:
[HTNK]
Primary=120mm
变成
[HTNK]
Primary=120mm
Owner=
Name=

expanded LAT functionality

one major limitations to terrain expansions are that FA2/RA2 are hardcoded to support only 4 LAT (lookup adjacent tile) sets. in temperate they are "rough grass, dark grass, sand, pavement". for any additional sets added, the map makers are forced to place each edge of every tile by hand. expanding LAT functionality to support more than 4 hardcoded LAT types, if possible, would enable more diverse terrain detailing.

Art for objects with no art.

It's hard to find units with no art in the map editor. This is why I propose adding art for objects with no art so you can find them easily.
This art can have remap, show directional frames, and even show building upgrades that have no art.
How would the art look like? By default, they'll have the same art style as the unused object images from FA2 shown below.

Bitmap186
Bitmap187
Bitmap188
Bitmap189

And you can customize it if you don't like it.

Rules.ini and Art.ini for FA2

Add a feature where FA2sp can use its own rules.ini and art.ini as an addition to the game's rules.ini and art.ini. TS map editors like Dawn of the Tiberium Age's map editor use this feature and so should RA2 YR map editors.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.