Merge branch 'main' into gitlocalize-35565
@@ -0,0 +1,15 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
||||
patreon: BeamMP # Replace with a single Patreon username
|
||||
open_collective: # Replace with a single Open Collective username
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: # Replace with a single Liberapay username
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
|
||||
polar: # Replace with a single Polar username
|
||||
buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
|
||||
thanks_dev: # Replace with a single thanks.dev username
|
||||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
||||
@@ -0,0 +1,661 @@
|
||||
GNU AFFERO GENERAL PUBLIC LICENSE
|
||||
Version 3, 19 November 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU Affero General Public License is a free, copyleft license for
|
||||
software and other kinds of works, specifically designed to ensure
|
||||
cooperation with the community in the case of network server software.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
our General Public Licenses are intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
Developers that use our General Public Licenses protect your rights
|
||||
with two steps: (1) assert copyright on the software, and (2) offer
|
||||
you this License which gives you legal permission to copy, distribute
|
||||
and/or modify the software.
|
||||
|
||||
A secondary benefit of defending all users' freedom is that
|
||||
improvements made in alternate versions of the program, if they
|
||||
receive widespread use, become available for other developers to
|
||||
incorporate. Many developers of free software are heartened and
|
||||
encouraged by the resulting cooperation. However, in the case of
|
||||
software used on network servers, this result may fail to come about.
|
||||
The GNU General Public License permits making a modified version and
|
||||
letting the public access it on a server without ever releasing its
|
||||
source code to the public.
|
||||
|
||||
The GNU Affero General Public License is designed specifically to
|
||||
ensure that, in such cases, the modified source code becomes available
|
||||
to the community. It requires the operator of a network server to
|
||||
provide the source code of the modified version running there to the
|
||||
users of that server. Therefore, public use of a modified version, on
|
||||
a publicly accessible server, gives the public access to the source
|
||||
code of the modified version.
|
||||
|
||||
An older license, called the Affero General Public License and
|
||||
published by Affero, was designed to accomplish similar goals. This is
|
||||
a different license, not a version of the Affero GPL, but Affero has
|
||||
released a new version of the Affero GPL which permits relicensing under
|
||||
this license.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU Affero General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Remote Network Interaction; Use with the GNU General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, if you modify the
|
||||
Program, your modified version must prominently offer all users
|
||||
interacting with it remotely through a computer network (if your version
|
||||
supports such interaction) an opportunity to receive the Corresponding
|
||||
Source of your version by providing access to the Corresponding Source
|
||||
from a network server at no charge, through some standard or customary
|
||||
means of facilitating copying of software. This Corresponding Source
|
||||
shall include the Corresponding Source for any work covered by version 3
|
||||
of the GNU General Public License that is incorporated pursuant to the
|
||||
following paragraph.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the work with which it is combined will remain governed by version
|
||||
3 of the GNU General Public License.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU Affero General Public License from time to time. Such new versions
|
||||
will be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU Affero General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU Affero General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU Affero General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If your software can interact with users remotely through a computer
|
||||
network, you should also make sure that it provides a way for users to
|
||||
get its source. For example, if your program is a web application, its
|
||||
interface could display a "Source" link that leads users to an archive
|
||||
of the code. There are many ways you could offer source, and different
|
||||
solutions will be better for different programs; see section 13 for the
|
||||
specific requirements.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU AGPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
|
After Width: | Height: | Size: 2.1 MiB |
|
After Width: | Height: | Size: 2.1 MiB |
|
After Width: | Height: | Size: 5.8 MiB |
|
After Width: | Height: | Size: 1.8 MiB |
|
After Width: | Height: | Size: 4.8 MiB |
|
After Width: | Height: | Size: 4.8 MiB |
|
After Width: | Height: | Size: 4.8 MiB |
@@ -0,0 +1,38 @@
|
||||
## Warum muss ich meine Mods deaktivieren?
|
||||
|
||||
In BeamMP stellt der Server, mit dem du dich verbindest, die notwendigen Mods bereit. Diese werden beim Verbinden automatisch heruntergeladen und aktiviert. Sind lokale Mods installiert und aktiviert, funktioniert BeamMP oft nicht richtig, selbst wenn du nur einen zusätzlichen Mod neben BeamMP hast.
|
||||
|
||||
!!! warning
|
||||
|
||||
Entferne alle Mods, die du im Ordner BeamNG.Drive\content\ oder in Unterordnern abgelegt hast. Dieser Speicherort ist NICHT für die Installation von Mods vorgesehen und kann zu Problemen führen, wie in der Datei `DO_NOT_INSTALL_MODS_HERE.txt` im selben Verzeichnis beschrieben.
|
||||
|
||||
!!! quote "DO_NOT_INSTALL_MODS_HERE.txt"
|
||||
|
||||
Kopiere KEINE Mods in diesen Ordner: Dies kann zu beschädigten Mods, einer langsameren Installation von Updates, einem beschädigten Mod-Manager, einem beschädigten abgesicherten Modus und anderen Problemen führen.
|
||||
|
||||
## Wie deaktiviere/entferne ich meine Mods?
|
||||
|
||||
Es gibt drei Möglichkeiten, mögliche Probleme bei der Verwendung von BeamMP zu lösen.
|
||||
|
||||
### 1. Mods deaktivieren
|
||||
|
||||
Bevor du einem Server beitrittst, stelle sicher, dass du außer „multiplayerbeammp“ keine Mods aktiviert hast. Wenn das Spiel einfriert oder weiterhin Probleme auftreten, probiere den nächsten Schritt.
|
||||
|
||||
### 2. Erstellen eines neuen Benutzerordners
|
||||
|
||||
Öffne den Benutzerordner von BeamNG.Drive und benenne den Ordner der neuesten Version (z. B. 0.35) um, z. B. in 0.xx_OLD (0.35_OLD). Schließe BeamNG.drive, bevor du ihn umbenennst.<br>
|
||||
|
||||
### 3. Entfernen von Mods aus dem content Ordnern.
|
||||
|
||||
Um auf den Ordner Beamng.drive\content\ zuzugreifen und ihn von allen Mods zu bereinigen, öffne den Installationsort von BeamNG.drive. Klicke mit der rechten Maustaste auf den Ordner `content` und lösche ihn. Überprüfe anschließend die Spieldateien über Steam oder Epic Games. Dadurch werden die Dateien erneut heruntergeladen.
|
||||
|
||||
Starte anschließend BeamNG.Drive über den BeamMP-Launcher. Im Repository sollte „multiplayerbeammp“ als einziger aktivierter Mod verfügbar sein. Im Hauptmenü findest du außerdem die Schaltfläche zum Aufrufen von BeamMP. Solltest du weiterhin Probleme beim Beitritt zu gemoddeten Servern haben, liegen wahrscheinlich defekte/veraltete Mods vor.
|
||||
|
||||
### 4. BeamMP-Launcher Cache bereinigen
|
||||
|
||||
Um zwischengespeicherte Mods aus den BeamMP-Verzeichnissen zu entfernen, gehe zum Installationsort deines BeamMP-Launchers. Standardmäßig lautet der Pfad „C:\Benutzer\AppData\BeamMP-Launcher“. Dort findest du den Ordner „Ressourcen“. Lösche diesen Ordner, um alle zwischengespeicherten Mods zu löschen. Dies kann hilfreich sein, wenn du mehr Speicherplatz auf deiner Festplatte benötigst oder veraltete BeamNG-Mods entfernen möchtest.
|
||||
|
||||
!!! question "Meine Einstellungen und Konfigurationen sind weg! Wie kann ich sie wiederherstellen?"
|
||||
|
||||
Wenn du den Benutzerordner umbenannt hast, wurde das Spiel gezwungen, einen neuen, sauberen Benutzerordner zu erstellen. Du kannst die beiden Ordner „Einstellungen“ und „Fahrzeuge“ aus dem umbenannten Ordner (z. B. 0.34_OLD) in den neu erstellten Ordner kopieren.
|
||||
Stelle sicher, dass BeamNG.Drive geschlossen ist, und ersetze alle Elemente am Zielort. Alle Konfigurationen und Einstellungen sollten nun wiederhergestellt sein.
|
||||
@@ -14,9 +14,9 @@ Eine vollständige Anleitung zur Installation von BeamMP unter Windows findet ma
|
||||
|
||||
---
|
||||
|
||||
### **Funktioniert BeamMP mit einer gecrackten Version von BeamNG?**
|
||||
### **Funktioniert BeamMP mit raubkopierten/modifizierten Versionen von BeamNG?**
|
||||
|
||||
BeamMP funktioniert nicht mit Raubkopien oder veralteten Versionen von BeamNG.drive. Das BeamMP-Supportteam bietet keinen Support bei Problemen mit gecrackten/veralteten Kopien.
|
||||
BeamMP funktioniert möglicherweise nicht mit Raubkopien oder veralteten Versionen von BeamNG.drive. Modifikationen, wie beispielsweise Mods von Drittanbietern, können zu Problemen mit BeamMP führen. (Siehe [„Mods entfernen“](https://github.com/Protogen187/Docs/blob/main/docs/en/FAQ/Clearing-mods.md) .) Das BeamMP-Supportteam kann keinen Support für Probleme im Zusammenhang mit Raubkopien, veralteten oder anderweitig modifizierten Versionen von BeamNG.drive leisten.
|
||||
|
||||
---
|
||||
|
||||
@@ -28,7 +28,7 @@ Der BeamMP-Launcher wird unter Linux nicht offiziell unterstützt. Du kannst jed
|
||||
|
||||
### **Warum wird der Launcher von meinem Antivirenprogramm oder Windows Defender als Virus erkannt?**
|
||||
|
||||
Einige Antivirus Programme Melden BeamMP möglicherweise als Bedrohung, weil es mit dem Netzwerk und anderen Komponenten interagiert. Es gibt **keine Schadsoftware** im Code. Der Code für den Launcher, Server und Lua Client können auf unserem [GitHub](https://github.com/BeamMP) gefunden werden.
|
||||
Manche Antivirenprogramme könnten BeamMP aufgrund von Netzwerkinteraktionen und anderen Faktoren als Bedrohung einstufen. Der Code enthält jedoch **keine Viren** . Den Code für Launcher, Server und Lua-Client findst du auf unserem [GitHub-Repository](https://github.com/BeamMP) .
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
---
|
||||
hide:
|
||||
- navigation
|
||||
---
|
||||
|
||||
# Willkommen im BeamMP Gemeinschafts-Bereich!
|
||||
|
||||
{width="450"} {width="450"}
|
||||
|
||||
## Unsere Social Media-Links
|
||||
|
||||
!!!failure ""
|
||||
|
||||
```
|
||||
BeamMP Forum - [https://forum.beammp.com](https://forum.beammp.com)
|
||||
```
|
||||
|
||||
!!!quote ""
|
||||
|
||||
```
|
||||
X (Twitter) - [https://x.com/BeamMPOfficial](https://x.com/BeamMPOfficial)
|
||||
```
|
||||
|
||||
!!!danger ""
|
||||
|
||||
```
|
||||
YouTube - [https://www.youtube.com/@BeamMPOfficial](https://www.youtube.com/@BeamMPOfficial)
|
||||
```
|
||||
|
||||
!!!warning ""
|
||||
|
||||
```
|
||||
Patreon - [https://www.patreon.com/c/BeamMP](https://www.patreon.com/c/BeamMP)
|
||||
```
|
||||
|
||||
!!!note ""
|
||||
|
||||
```
|
||||
Discord - [https://discord.com/invite/beammp](https://discord.com/invite/beammp)
|
||||
```
|
||||
|
||||
!!!info ""
|
||||
|
||||
```
|
||||
BlueSky - [https://bsky.app/profile/beammpofficial.bsky.social](https://bsky.app/profile/beammpofficial.bsky.social)
|
||||
```
|
||||
|
||||
## Regeln
|
||||
|
||||
Unsere Regeln findest du [hier](rules.md)
|
||||
@@ -29,21 +29,43 @@ BeamMP ist vollständig kompatibel mit Windows und Linux, an der Kompatibilität
|
||||
|
||||
### **2b. Linux Installation**
|
||||
|
||||
Derzeit musst du den Launcher selbst erstellen. Dazu benötigst du grundlegende Kenntnisse zum Erstellen einer Anwendung.
|
||||
Derzeit musst du den Launcher selbst kompilieren (erstellen). Dazu benötigst du grundlegende Kenntnisse über den Prozess der Erstellung einer Anwendung (Kompilierung).
|
||||
|
||||
Stelle sicher, dass [`vcpkg`](https://learn.microsoft.com/en-us/vcpkg/get_started/get-started?pivots=shell-bash#1---set-up-vcpkg) sowie grundlegende Entwicklungstools installiert sind, welche oft in Paketen enthalten sind, zum Beispiel:
|
||||
Stelle sicher, dass grundlegende Entwicklungstools (Build-Tools) installiert sind, die oft in folgenden Paketen enthalten sind:
|
||||
|
||||
- Debian: `sudo apt install build-essential`
|
||||
- Fedora: `sudo dnf install cmake gcc-c++ perl-IPC-Cmd perl-FindBin perl-File-Compare perl-File-Copy`
|
||||
- Fedora: `sudo dnf install cmake gcc gcc-c++ make perl perl-IPC-Cmd perl-FindBin perl-File-Compare perl-File-Copy kernel-headers kernel-devel`
|
||||
- Arch: `sudo pacman -S base-devel`
|
||||
- openSUSE: `zypper in -t pattern devel-basis`
|
||||
- SteamOS (Arch): `sudo pacman -S base-devel linux-api-headers glibc libconfig` (Du musst auch `sudo steamos-readonly disable` ausführen, schalte es jedoch nach der Installation wieder ein)
|
||||
|
||||
Klone das BeamMP-Launcher-Repository mit `git` auf dein System, zum Beispiel: `git clone https://github.com/BeamMP/BeamMP-Launcher.git` [Weitere Informationen zum Klonen eines GitHub-Repos](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository)
|
||||
|
||||
Lade das "Tag", das für die [neueste Version](https://github.com/BeamMP/BeamMP-Launcher/releases/latest) verwendet wurde. Wenn beispielsweise `v2.3.2` in der neuesten Version verwendet wird, führe `git checkout v2.3.2` aus.
|
||||
Klone vcpkg, initialisiere es und füge es zur PATH-Umgebungsvariable hinzu.
|
||||
|
||||
Im Stammverzeichnis des Projekts, führe aus:
|
||||
1.
|
||||
```bash
|
||||
git clone https://github.com/microsoft/vcpkg.git
|
||||
```
|
||||
|
||||
2.
|
||||
```bash
|
||||
./vcpkg/bootstrap-vcpkg.sh
|
||||
```
|
||||
|
||||
3.
|
||||
```bash
|
||||
export VCPKG_ROOT="$(pwd)/vcpkg"
|
||||
export PATH=$VCPKG_ROOT:$PATH
|
||||
```
|
||||
|
||||
|
||||
Klone das BeamMP-Launcher-Repository mit `git` auf dein System, zum Beispiel:
|
||||
`git clone https://github.com/BeamMP/BeamMP-Launcher.git`
|
||||
[Weitere Informationen zum Klonen eines GitHub-Repos](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository)
|
||||
|
||||
Wechsle zum neuesten "Tag" (Versionsstand). Lade das "Tag" herunter, das für die neueste Version verwendet wurde. Wenn beispielsweise v2.3.2 in der neuesten Version verwendet wird, führe im Repository-Ordner `git checkout v2.3.2` aus.
|
||||
|
||||
Führe im Stammverzeichnis des Projekts folgende Schritte aus:
|
||||
|
||||
1.
|
||||
```cmake
|
||||
@@ -61,9 +83,26 @@ cmake --build bin --parallel
|
||||
|
||||
!!!note ""
|
||||
|
||||
Wenn du -DCMAKE_BUILD_TYPE=Release nicht spezifizierst, erstellst du eine Debug-Version, die zwar eine größere Dateigröße hat, aber nicht den Fehler „Launcher kann sich nur einmal mit einem Server verbinden“ enthält.
|
||||
Wenn du -DCMAKE_BUILD_TYPE=Release nicht spezifizierst, erstellst du eine Debug-Version, die zwar eine größere Dateigröße hat, aber nicht den Fehler „Launcher kann sich nur einmal mit einem Server verbinden" enthält.
|
||||
|
||||
Verschiebe die fertige Anwendung aus dem `/bin` Ordner in einen eigenen Ordner und führe sie von dort aus aus.
|
||||
!!!note "Fedora Benutzer"
|
||||
Wenn vcpkg während der OpenSSL-Kompilierung aufgrund von Kernel-Header-Fehlern fehlschlägt, stelle sicher, dass alle Abhängigkeiten installiert sind:
|
||||
```bash
|
||||
sudo dnf install kernel-headers kernel-devel gcc gcc-c++ make perl
|
||||
```
|
||||
Bereinige dann den vcpkg-Cache:
|
||||
```bash
|
||||
rm -rf $VCPKG_ROOT/buildtrees/openssl
|
||||
```
|
||||
Und wiederhole den cmake-Konfigurationsbefehl (Schritt 1).
|
||||
|
||||
Verschiebe die fertige Anwendung aus dem `/bin` Ordner in einen eigenen Ordner und führe sie von dort aus aus:
|
||||
```bash
|
||||
mkdir -p ~/beammp-launcher
|
||||
cp bin/BeamMP-Launcher ~/beammp-launcher/
|
||||
cd ~/beammp-launcher
|
||||
./BeamMP-Launcher
|
||||
```
|
||||
|
||||
Der native Linux BeamMP-Launcher wird gestartet und verwendet das native Linux BeamNG.drive
|
||||
|
||||
@@ -98,7 +137,7 @@ Beachte, dass hierbei davon ausgegangen wird, dass die Binärdatei des Launchers
|
||||
## **3. Bekannte Probleme**
|
||||
|
||||
- Der native Linux BeamMP-Launcher kann sich derzeit nur einmal mit einem Server verbinden, nach dem Trennen der Verbindung muss der Launcher neu gestartet werden. Dies ist möglich, ohne das Spiel zwischendurch schließen zu müssen.
|
||||
- Wenn die Schaltfläche „Multiplayer“ nicht angezeigt wird, stelle sicher, dass der BeamMP-Mod im „Mod Manager“ vorhanden und aktiviert ist, und drücke dann STRG + L.
|
||||
- Wenn die Schaltfläche „Multiplayer" nicht angezeigt wird, stelle sicher, dass der BeamMP-Mod im „Mod Manager" vorhanden und aktiviert ist, und drücke dann STRG + L.
|
||||
- VPNs jeglicher Art können Verbindungsprobleme verursachen.
|
||||
- Wenn der Launcher Fehler meldet, lies die [FAQ](https://forum.beammp.com/c/faq/35) .
|
||||
|
||||
|
||||
@@ -5,13 +5,10 @@ hide:
|
||||
|
||||
!!! warning "Diese Seite befindet sich im Aufbau!"
|
||||
|
||||
```
|
||||
Diese Seite steht unter aktiver Bearbeitung.
|
||||
Diese Seite steht unter aktiver Bearbeitung.
|
||||
Denkst du, dass du helfen könntest? Das kannst du tun, indem du auf das Editier Symbol auf der rechten Seite klickst!
|
||||
Das trifft auch auf alle anderen Seiten zu.
|
||||
|
||||
Denkst du, dass du helfen könntest? Das kannst du tun, indem du auf das Editier Symbol auf der rechten Seite klickst!
|
||||
|
||||
Das trifft auch auf alle anderen Seiten zu.
|
||||
```
|
||||
|
||||
# Willkommen bei BeamMP Docs! :tada:
|
||||
|
||||
@@ -30,3 +27,7 @@ Du möchtest deinen eigenen BeamMP-Server erstellen? Unsere umfassende Anleitung
|
||||
Erfahre alles Wissenswerte zur Erstellung von Ressourcen für den BeamMP-Server in unserer [Anleitung zur Ressourcenentwicklung](../guides/mod-creation/server/getting-started.md).
|
||||
|
||||
Aufregende Updates stehen bevor, einschließlich einer brandneuen Homepage, die entwickelt wurde, um dein Browsing-Erlebnis zu verbessern. Bleib dran für weitere Neuigkeiten! :slight_smile:
|
||||
|
||||
## Community Regeln
|
||||
|
||||
Lies dir die [Community-Regeln](https://docs.beammp.com/community/rules/) von BeamMP durch und informiere dich darüber, wie du gegen Bans Einspruch einlegen kannst.
|
||||
|
||||
@@ -28,20 +28,22 @@ Das Aufsetzen besteht aus folgenden Schritten. Du solltest alle davon durchgehen
|
||||
|
||||
!!! info
|
||||
|
||||
Wenn du auf einem VPS (Virtual Private Server), Rotoserver bist, oder planst einen Server lokal zu hosten (mit Spielern im selben Haus wie du), kannst du diesen Schritt überspringen.
|
||||
Dieser Schritt ist jedoch notwendig, wenn Spieler **außerhalb** deines Haushaltes deinem heim-gehosteten Server beitreten sollen (außerhalb von deinem lokalen Netzwerk)
|
||||
```
|
||||
Wenn du einen VPS (Virtual Private Server), einen Rootserver nutzt oder planst, diesen Server lokal zu hosten (mit Spielern im selben Haus wie du), kannst du diesen Schritt überspringen.
|
||||
Dieser Schritt ist notwendig, wenn, jemand **außerhalb** des Haushalts einem selbst gehosteten Server beitreten soll (außerhalb Ihres lokalen Netzwerks).
|
||||
|
||||
!!! danger ":material-scale-balance: ACHTUNG:"
|
||||
!!! danger :material-scale-balance: HAFTUNGSAUSSCHLUSS:"
|
||||
|
||||
**Port forwarding ist ein Risiko**.
|
||||
**Portweiterleitung birgt Risiken.**
|
||||
|
||||
Wenn du Ports weiterleitest, sind dir die Risiken beim öffnen von Ports von deinem Heimnetz ins öffentliche Netz bewusst und verlierst das Recht, BeamMP für **jegliche Schäden**, welche deinem Haushalt passieren könnten, Haften zu lassen.
|
||||
Mit der Portweiterleitung erklären Sie sich mit den Risiken einverstanden, Ports in Ihrem Heimnetzwerk für die Öffentlichkeit zu öffnen, und verzichten daher auf das Recht, BeamMP für **jegliche** Schäden haftbar zu machen, die Ihnen oder Ihrem Haushalt entstehen könnten.
|
||||
|
||||
Wir übernehmen keine Haftung für jegliche extern gelinkten Dienste oder Webseiten.
|
||||
Wir übernehmen keine Verantwortung für Inhalte auf extern verlinkten Diensten oder Websites.
|
||||
|
||||
Es wird daher empfohlen, BeamMP Server mit einen unserer Partner Hosting Services zu hosten.
|
||||
Es wird daher empfohlen, einen Server bei einem unserer Partnerdienste zu hosten!
|
||||
|
||||
*Sieh dir [diese Anleitung zum Port weiterleiten](port-forwarding.md) an*
|
||||
*Bitte lese [diese Anleitung zur Portweiterleitung](port-forwarding.md)*
|
||||
```
|
||||
|
||||
#### Partner Hosting Services (bezahlt):
|
||||
|
||||
@@ -49,13 +51,16 @@ Das Aufsetzen besteht aus folgenden Schritten. Du solltest alle davon durchgehen
|
||||
- [RackGenius](https://rackgeni.us/beammp-plans)
|
||||
- [Connect Hosting](https://connecthosting.net/beammp)
|
||||
- [Assetto Hosting](https://assettohosting.com/en/games/beamng)
|
||||
- [Zap Hosting](https://zap-hosting.com/en/beammp-server-hosting/)
|
||||
- [ZAP-Hosting](https://zap-hosting.com/itsbeammp)
|
||||
- [HostHavoc](https://hosthavoc.com/)
|
||||
- [PedalHost](https://pedal.host/)
|
||||
- [Vyper Hosting](https://vyperhosting.com/r/beammp)
|
||||
- [BisectHosting](https://www.bisecthosting.com/beammp-server-hosting)
|
||||
- [Four Seasons Hosting](https://fourseasonshosting.com)
|
||||
- [Vertuo Hosting](https://vertuohosting.com)
|
||||
- [Winheberg](https://winheberg.fr/offres/gaming/beammp?lang=en)
|
||||
- [Wabbanode](https://wabbanode.com/partner/beammp)
|
||||
- [Iceline Hosting](https://iceline-hosting.com/games/beammp)
|
||||
|
||||
#### 1.1 Firewall
|
||||
|
||||
@@ -63,7 +68,7 @@ Abhängig von deinem Setup musst du den BeamMP-Server möglicherweise durch die
|
||||
|
||||
Dort lässt du den BeamMP-Server durch die Firewall, **sowohl eingehende als auch ausgehende Verbindungen** sowie **TCP und UDP** . Falls die Firewall stattdessen nach einem Port fragt, muss dieser derselbe sein, den du in Schritt „1. Portweiterleitung“ verwendet hast (standartmäßig 30814).
|
||||
|
||||
Solltest du Probleme haben, frage auf unserem [Forum](https://forum.beammp.com) oder auf unserem [Discord server](https://discord.gg/beammp) im `#support` Kanal.
|
||||
Eine detailliertere Anleitung findest du unter [dieser Dokumentationsseite](https://docs.beammp.com/FAQ/Defender-exclusions/) . Bei Problemen kannst du dich an unser [Forum](https://forum.beammp.com) oder auf unseren [Discord-Server](https://discord.gg/beammp) im Kanal `#support` an uns wenden.
|
||||
|
||||
### **2. Authentifizierungsschlüssel**
|
||||
|
||||
@@ -71,42 +76,44 @@ Der Authentifizierungsschlüssel, auch “Authentication Key” oder “AuthKey
|
||||
|
||||
!!! warning "WARNUNG"
|
||||
|
||||
TEILE ODER ZEIGE DEN SCHLÜSSEL NICHT. BEHANDLE IHN WIE EIN PASSWORT.
|
||||
```
|
||||
TEILE ODER ZEIGE DEN SCHLÜSSEL NICHT. BEHANDLE IHN WIE EIN PASSWORT.
|
||||
```
|
||||
|
||||
Um einen Schlüssel zu erwerben ist ein [Discord](https://discord.com) Konto erforderlich. Das ist wichtig um gegen Spam zu schützen.
|
||||
|
||||
#### 2.1. Die Schlüssel-Übersicht öffnen
|
||||
|
||||
Melde dich mit Discord beim [Keymaster](https://beammp.com/keymaster) an. Klicke auf der Keymaster-Homepage links auf dem Bildschirm auf „Keys“:
|
||||
Melde dich mit Discord bei [Keymaster](https://keymaster.beammp.com) an. Klicke auf der Keymaster-Startseite links auf „Schlüssel“.
|
||||
|
||||
|
||||
<figure markdown></figure>
|
||||
<figure markdown=""></figure>
|
||||
|
||||
#### 2.2. Einen Schlüssel erstellen
|
||||
|
||||
Um einen Schlüssel zu erstellen, klicke das grüne ,,+" oben rechts.
|
||||
|
||||
|
||||
<figure markdown></figure>
|
||||
<figure markdown=""></figure>
|
||||
|
||||
#### 2.3. Schlüssel-Informationen eingeben
|
||||
|
||||
Als nächstes, fülle das Feld für den Servernamen (das ist lediglich der Name des Schlüssels, nicht der Name vom Server in der Liste), dann klick ,,Create".<br>Beispiel:
|
||||
|
||||
|
||||
<figure class="image image_resized" style="width:44.84%;" markdown></figure>
|
||||
<figure class="image image_resized" style="width:44.84%;" markdown=""></figure>
|
||||
|
||||
es sollte am Ende wie folgt aussehen:
|
||||
|
||||
|
||||
<figure markdown></figure>
|
||||
<figure markdown=""></figure>
|
||||
|
||||
#### 2.4. Den Schlüssel kopieren
|
||||
|
||||
Kopiere den Text im “Key” Feld. In diesem Beispiel wäre das `3173a2e-6az0-4542-a3p0-ddqq5ff95558`. Klicke das ,,Klemmbrett Symbol" neben dem Schlüssel um diesen zu kopieren.
|
||||
|
||||
|
||||
<figure markdown></figure>
|
||||
<figure markdown=""></figure>
|
||||
|
||||
### **3. Installation**
|
||||
|
||||
@@ -140,7 +147,7 @@ Dieser Schritt funktioniert auf allen Distributionen für die wir Binaries anbie
|
||||
6. Start den Server mittels `./BeamMP-Server-xxx`. Der Server erstellt automatisch die benötigten Dateien. <br>Wenn Text im Server Feld erscheint, kannst du diesen wieder schließen. Du solltest eine `ServerConfig.toml` neben dem `BeamMP-Server.exe` sehen.
|
||||
7. (optional) Es wird empfohlen einen User namens `beammpserver` (oder ähnlich) zu erstellen, da wir empfehlen, NICHT den Server als root, sudo oder mit dem persönlichen Useraccount auszuführen. Du solltest dann die nötigen Schritte tätigen um den Server als den Server-user zu starten.
|
||||
|
||||
Nun springe zu Schritt "4. Konfiguration".
|
||||
Fahre nun mit Schritt „4. Konfiguration“ fort.
|
||||
|
||||
##### Binary selbst erstellen
|
||||
|
||||
@@ -153,31 +160,41 @@ Führe zum Abschluss den Server unbedingt einmal mit `./BeamMP-Server` aus und f
|
||||
Nachdem der Server einmal gestartet wurde, sollte er die nötigen Dateien erstellt haben und einen oder zwei Fehler in die Konsole schreiben. Das ist normal, da wir noch nicht fertig sind.<br>Es sollten nun folgende Dateien vorhanden sein:
|
||||
|
||||
|
||||
<figure markdown></figure>
|
||||
<figure markdown=""></figure>
|
||||
|
||||
Genannt ,,ServerConfig.toml”, ,,Server.log” und ,,BeamMP-Server.exe”! (Je nach deinen Einstellungen, siehst du möglicherweise die [.toml] [.log] [.exe] Erweiterungen nicht)
|
||||
|
||||
Öffne die `ServerConfig.toml` mit einem Texteditor wie zum Beispiel `Notepad` . Dies kannst du mit **[Rechtsklick] → „Öffnen mit…“** und anschließender Auswahl eines Texteditors tun.
|
||||
|
||||
Die Datei sollte ungefähr so aussehen
|
||||
Hier ist eine Beispielkonfiguration:
|
||||
|
||||
```TOML
|
||||
[General]
|
||||
AuthKey = ''
|
||||
Debug = false
|
||||
Description = 'BeamMP Default Description'
|
||||
Map = '/levels/gridmap_v2/info.json'
|
||||
MaxCars = 1
|
||||
MaxPlayers = 10
|
||||
Name = 'BeamMP Server'
|
||||
Port = 30814
|
||||
Private = false
|
||||
ResourceFolder = 'Resources'
|
||||
AuthKey = "auth-key"
|
||||
AllowGuests = false
|
||||
LogChat = false
|
||||
Debug = false
|
||||
IP = "::"
|
||||
Private = true
|
||||
InformationPacket = true
|
||||
Name = "Test Server"
|
||||
Tags = "Freeroam,Modded,Racing,Police"
|
||||
MaxCars = 2
|
||||
MaxPlayers = 10
|
||||
Map = "/levels/ks_nord/info.json"
|
||||
Description = "Total Random Beam MP Server"
|
||||
ResourceFolder = "Resources"
|
||||
```
|
||||
|
||||
Dies ist deine Konfigurationsdatei. Diese verwendet das Format TOML. Weitere Informationen zu dieser Datei findest du im Abschnitt [Serverwartung](server-maintenance.md) .
|
||||
!!! info
|
||||
|
||||
Als erstes kümmern wir uns um den `AuthKey`. Dazu muss der Schlüssel zwischen die Anführungszeichen `" "` eingefügt werden.
|
||||
```
|
||||
Dies ist deine Konfigurationsdatei. Sie verwendet das Format TOML. Weitere Informationen zu dieser Datei und den Variablen findest du im Abschnitt [Serverwartung](server-maintenance.md).
|
||||
Der Server wird **NICHT** in der Serverliste angezeigt, solange `Private = true` eingestellt ist. _Wenn_ er in der Liste angezeigt werden soll, setze die Einstellung auf **`Private = false`**.
|
||||
```
|
||||
|
||||
Fürs Erste ist nur das Feld `AuthKey` relevant. Zwischen den Anführungszeichen `''` fügt man den AuthKey ein, den du im ersten Schritt kopiert hast.
|
||||
|
||||
Für unser Beispiel sollte der Eintrag so aussehen:
|
||||
|
||||
@@ -185,14 +202,10 @@ Für unser Beispiel sollte der Eintrag so aussehen:
|
||||
AuthKey = '3173a2e-6az0-4542-a3p0-ddqq5ff95558'
|
||||
```
|
||||
|
||||
Vergib deinem Server einen Namen im `Name` Feld. Du kannst diesen mit Farben und mehr formatieren. Siehe [diese Sesktion](server-maintenance.md#customize-the-look-of-your-server-name) auf der Server-Wartungsseite.
|
||||
Gib dem Server im Feld `Name` ebenfalls einen Namen. Du kannst diesen mit Farben und weiteren Optionen formatieren. Weitere Informationen findest du [im Abschnitt „Namensanpassung“](server-maintenance.md#customize-the-look-of-your-server-name) auf der Serververwaltungsseite.
|
||||
|
||||
Wenn du einen anderen **Port** als **30814** ausgewählt hast, achte darauf, ihn hier unter `Port` zu ersetzen.
|
||||
|
||||
!!! info
|
||||
|
||||
Dein Server wird **NICHT** in der Serverliste erscheinen, solange `Private = true` ist. _Wenn_ du ihn gelistet haben willst, stell den Parameter auf **`Private = false`**.
|
||||
|
||||
### **5. Validierung**
|
||||
|
||||
Nun führe den Server erneut aus und sieh nach, ob weitere `[ERROR]` oder `[WARN]` Meldungen erscheinen. Der Server sollte nun offen bleiben. In den folgenden Schritten (6.) erfährst du, wie man dem Server beitritt.
|
||||
@@ -201,7 +214,14 @@ Nun führe den Server erneut aus und sieh nach, ob weitere `[ERROR]` oder `[WARN
|
||||
|
||||
#### 5.1 Wie man dem Server Mods hinzufügt
|
||||
|
||||
Fahrzeug und Map Mods werden unterschiedlich im Server installiert, müssen aber beide im Ordner (`Resources/Client`) abelegt werden. Alle Mods die hinzugefügt werden sollen kommen in diesen Ordner.
|
||||
Fahrzeug- und Karten-Mods werden unterschiedlich installiert, müssen aber beide im Serverordner ( `Resources/Client` ) abgelegt werden. Ziehe einfach die gewünschten Mods in diesen Ordner.
|
||||
|
||||
!!! warning
|
||||
|
||||
```
|
||||
Solltest du beim Versuch, deinem Server nach dem Hinzufügen von Mods beizutreten, die Meldung „Fertig“ oder „Start“ erhalten, hast du wahrscheinlich eine inkompatible oder fehlerhafte Mod dem Server hinzugefügt.
|
||||
Inkompatibilitäten zwischen zwei oder mehr Mods können ebenfalls auftreten. Falls du Client-Mods installiert hast, lies bitte [diese Anleitung](../../FAQ/How-to-deactivate-mods.md) zum Entfernen von Mods aus deinem Spiel.
|
||||
```
|
||||
|
||||
#### 5.2 Allgemeine Mods
|
||||
|
||||
@@ -209,7 +229,7 @@ Wenn du nur modifizierte Fahrzeuge hinzufügen möchtest, lege die Zip-Datei der
|
||||
|
||||
#### 5.3 Karten
|
||||
|
||||
Alle Standardkarten (Karten, die keine Mods sind) funktionieren sofort und müssen nicht installiert werden. Ändere einfach die `Map` in der `ServerConfig.toml` Datei auf eine der [folgenden Optionen](server-maintenance.md#all-vanilla-maps-names) . Für alle anderen modifizierten Karten geht man wie folgt vor:
|
||||
Alle Standardkarten (Karten, die keine Mods sind) funktionieren sofort und müssen nicht installiert werden. Ändere einfach die `Map` in der Datei `ServerConfig.toml` auf eine der [folgenden Optionen](server-maintenance.md#all-vanilla-maps-names) . Für alle anderen modifizierten Karten gehe wie folgt vor:
|
||||
|
||||
1. Legen die `.zip` Datei der Karte in den Ordner `Resources/Client` des Servers.
|
||||
2. Sieh dir als Nächstes in die Zip-Datei der Karte (entpacke sie nicht) und öffne den Ordner „ `levels` “. In diesem Ordner sollte sich lediglich ein weiterer Ordner mit dem Namen der Karte befinden, zum Beispiel „myawesomedriftmap2021“. Achte darauf, diesen Namen *genau so zu kopieren oder zu merken, wie er im Namen dieses Ordners geschrieben ist.*
|
||||
@@ -243,18 +263,32 @@ Du musst anderen Spielern die öffentliche IP Adresse des Servers geben. Sei jed
|
||||
|
||||
#### 6.c. Andere Spieler treten deinem öffentlichen Server bei
|
||||
|
||||
Um deinem öffentlichen Server beizutreten, gehe zur Server Liste und gib den Namen des Servers ein und klicke ,,Connect". Wenn du dir nicht sicher über den Namen des Server bist, es wird der Name sein, welchen du in der `ServerConfig.toml` festlegst. Stelle sicher dass Suchfilter deaktiviert sind und dass die Karte auf "Any" gesetzt ist, wenn du ihn nicht findest. Du kannst auch die [Keymaster](https://beammp.com/keymaster) Webseite für die IP des Servers prüfen.
|
||||
Um einem öffentlichen Server beizutreten, können Benutzer einfach die Serverliste aufrufen, den Servernamen eingeben und auf „Verbinden“ klicken. Falls du/sie den Servernamen nicht kennen, findest du ihn in der Datei `ServerConfig.toml` . Sollte niemand den Server nicht finden, stelle sicher, dass die Suchfilter deaktiviert und die Zuordnung auf „Beliebig“ eingestellt ist. Die IP-Adresse des Servers findest du auch auf der Website von [Keymaster](https://keymaster.beammp.com/) .
|
||||
|
||||
Sollten du oder deine Freunde einen ,,Verbindung Fehlgeschlagen!" Fehler bekommen, prüfe das Launcher Fenster auf Codes wie 10060, 10061 oder 10030. Das bedeutet, dass du entweder eine CGNAT IPv4 hast, oder du hast etwas bei Schritt **1 Port Forwarding** oder **1.1. Firewall** falsch gemacht. Um zu prüfen ob du eine CGNAT IPv4 hast, finde die WAN IP Adresse im Router Interface. Vergleiche diese mit deiner [öffentlichen IP](https://www.whatsmyip.org/). Wenn diese gleich sind, hast du keine CGNAT IP. IPv6 Support ist noch **NICHT** implementiert.
|
||||
|
||||
### **7. So überprüft man die Verbindung deines BeamMP-Servers**
|
||||
|
||||
Gib unten die öffentliche IPv4-Adresse und den Port des Servers ein und klicke dann auf „CheckBeamMP“.
|
||||
|
||||
<form action="https://check.beammp.com/api/v2/beammp" method="get" target="_blank">
|
||||
<label for="ip">IP Adresse:</label>
|
||||
<input type="text" id="ip" name="ip"><br>
|
||||
<label for="port">Port:</label>
|
||||
<input type="text" id="port" name="port"><br>
|
||||
<input type="submit" value="CheckBeamMP">
|
||||
</form>
|
||||
|
||||
!!! warning "Ich möchte einen VPN wie RadminVPN, Hamachi oder ähnlich verwenden"
|
||||
|
||||
BeamMP unterstützt diese VPNs nicht, weil diese oft Probleme verursachen. Eines davon ist das blockieren von UDP Verkehr. Um dies zu beheben, siehe Sektion 1.
|
||||
|
||||
!!! question "Aber warum hat es vorher funktioniert?"
|
||||
|
||||
Das passiert, weil die Entwickler dieser Applikationen updaten und Änderungen implementiere, über welche BeamMP keine Kontroll hat.
|
||||
Es liegt an den Entwicklern diesen Applikationen, um Support für spezifische Fälle wie eines BeamMP-Servers zu unterstützen.
|
||||
```
|
||||
BeamMP unterstützt diese VPNs nicht, weil diese oft Probleme verursachen. Eines davon ist das blockieren von UDP Verkehr. Um dies zu beheben, siehe Sektion 1.
|
||||
|
||||
!!! question "Aber warum hat es vorher funktioniert?"
|
||||
|
||||
Das passiert, weil die Entwickler dieser Applikationen updaten und Änderungen implementiere, über welche BeamMP keine Kontroll hat.
|
||||
Es liegt an den Entwicklern diesen Applikationen, um Support für spezifische Fälle wie eines BeamMP-Servers zu unterstützen.
|
||||
```
|
||||
|
||||
## Immer noch Probleme?
|
||||
|
||||
|
||||
@@ -2,17 +2,15 @@
|
||||
|
||||
!!! danger ":material-scale-balance: ACHTUNG"
|
||||
|
||||
**Das weiterleiten von Ports ist ein Risiko**.
|
||||
**Das weiterleiten von Ports ist ein Risiko**.
|
||||
Durch die Portweiterleitung bist du dir den Risiken bewusst, die mit der Öffnung von Ports in das öffentliche Netz verbunden sind. Daher verlierst du das Recht, BeamMP für **alle** Schäden haftbar zu machen, die dir oder deinem Haushalt entstehen können.
|
||||
Wir übernehmen keine Verantwortung für Inhalte auf extern verlinkten Diensten oder Websites.
|
||||
<u>**Wenn du diese Anleitung nicht verstehst, ziehe die Nutzung eines unserer Hosting Partner in Betracht.**</u>
|
||||
|
||||
Durch die Portweiterleitung bist du dir den Risiken bewusst, die mit der Öffnung von Ports in das öffentliche Netz verbunden sind. Daher verlierst du das Recht, BeamMP für **alle** Schäden haftbar zu machen, die dir oder deinem Haushalt entstehen können.
|
||||
!!! warning "Warnung"
|
||||
|
||||
Wir übernehmen keine Verantwortung für Inhalte auf extern verlinkten Diensten oder Websites.
|
||||
Bitte stelle sicher, dass dein Router kein 4G/5G-exklusives Gerät ist. Wenn es sich um ein Hybridgerät handelt, wähle später in Abschnitt 3 dieser Anleitung unbedingt den kabelgebundenen Adapter aus!
|
||||
|
||||
<u>**Wenn du diese Anleitung nicht verstehst, ziehe die Nutzung eines unserer Hosting Partner in Betracht.**</u>
|
||||
|
||||
!!! warning "Warnung"
|
||||
|
||||
Bitte stelle sicher, dass dein Router kein 4G/5G-exklusives Gerät ist. Wenn es sich um ein Hybridgerät handelt, wähle später in Abschnitt 3 dieser Anleitung unbedingt den kabelgebundenen Adapter aus!
|
||||
|
||||
## So richtest du die Portweiterleitung ein.
|
||||
|
||||
@@ -23,41 +21,40 @@ Diese Anleitung besteht aus vier Hauptschritten.
|
||||
## Eine Kurzanleitung. (Eine ausführlichere Anleitung findest du weiter unten.)
|
||||
|
||||
<div class="grid cards" markdown>
|
||||
|
||||
- :material-dns:{ .lg .middle } __Weisen Sie Ihrem Computer oder Ihren Geräten eine statische IP-Adresse zu__
|
||||
|
||||
---
|
||||
ies ist erforderlich, um zu verhindern, dass sich die IP deines Geräts ändert und die Portweiterleitung funktioniert.
|
||||
|
||||
|
||||
[:octicons-arrow-right-24: Informationen zu Ihrem Router anzeigen](https://portforward.com/router.htm#1)
|
||||
|
||||
- :material-router-wireless:{ .lg .middle } __Melde dich bei deinem Router an__
|
||||
|
||||
---
|
||||
|
||||
Dies kann normalerweise durch Suchen der IP des „Standard-Gateways“ erfolgen, die gefunden werden kann, wenn `ipconfig` in einer Eingabeaufforderung ausgeführt und in die Adressleiste eines Webbrowsers eingegeben wird.
|
||||
|
||||
- :material-lan-connect:{ .lg .middle } __Leite Ports an deinen Computer weiter__
|
||||
|
||||
---
|
||||
|
||||
Suche in der Weboberfläche Ihres Routers nach dem Abschnitt zur Portweiterleitung. Bei den meisten Routern findet man dies unter „Netzwerk“, „Erweitert“ oder „LAN“.
|
||||
|
||||
- :material-test-tube:{ .lg .middle } __Teste, ob dein Port richtig weitergeleitet wird__
|
||||
|
||||
---
|
||||
|
||||
Verwenden Sie ein Tool wie CheckBeamMP, um zu testen, ob die Regel funktioniert.
|
||||
|
||||
<form action="https://check.beammp.com/api/v2/beammp" method="get" target="_blank">
|
||||
<label for="ip">IP adress:</label>
|
||||
<input type="text" id="ip" name="ip"><br>
|
||||
<label for="port">Port:</label>
|
||||
<input type="text" id="port" name="port"><br>
|
||||
<input type="submit" value="CheckBeamMP">
|
||||
</form>
|
||||
</div>
|
||||
<ul data-md-type="list" data-md-list-type="unordered" data-md-list-tight="false">
|
||||
<li data-md-type="list_item" data-md-list-type="unordered">
|
||||
<p data-md-type="paragraph">:material-dns:{ .lg .middle } <strong data-md-type="double_emphasis">Weisen Sie Ihrem Computer oder Ihren Geräten eine statische IP-Adresse zu</strong></p>
|
||||
<hr data-md-type="hrule">
|
||||
<p data-md-type="paragraph">ies ist erforderlich, um zu verhindern, dass sich die IP deines Geräts ändert und die Portweiterleitung funktioniert.</p>
|
||||
<p data-md-type="paragraph"><a href="https://portforward.com/router.htm#1" data-md-type="link">:octicons-arrow-right-24: Informationen zu Ihrem Router anzeigen</a></p>
|
||||
</li>
|
||||
<li data-md-type="list_item" data-md-list-type="unordered">
|
||||
<p data-md-type="paragraph">:material-router-wireless:{ .lg .middle } <strong data-md-type="double_emphasis">Melde dich bei deinem Router an</strong></p>
|
||||
<hr data-md-type="hrule">
|
||||
<p data-md-type="paragraph">Dies kann normalerweise durch Suchen der IP des „Standard-Gateways“ erfolgen, die gefunden werden kann, wenn <code data-md-type="codespan">ipconfig</code> in einer Eingabeaufforderung ausgeführt und in die Adressleiste eines Webbrowsers eingegeben wird.</p>
|
||||
</li>
|
||||
<li data-md-type="list_item" data-md-list-type="unordered">
|
||||
<p data-md-type="paragraph">:material-lan-connect:{ .lg .middle } <strong data-md-type="double_emphasis">Leite Ports an deinen Computer weiter</strong></p>
|
||||
<hr data-md-type="hrule">
|
||||
<p data-md-type="paragraph">Suche in der Weboberfläche Ihres Routers nach dem Abschnitt zur Portweiterleitung. Bei den meisten Routern findet man dies unter „Netzwerk“, „Erweitert“ oder „LAN“.</p>
|
||||
</li>
|
||||
<li data-md-type="list_item" data-md-list-type="unordered">
|
||||
<p data-md-type="paragraph">:material-test-tube:{ .lg .middle } <strong data-md-type="double_emphasis">Teste, ob dein Port richtig weitergeleitet wird</strong></p>
|
||||
<hr data-md-type="hrule">
|
||||
<p data-md-type="paragraph">Verwenden Sie ein Tool wie CheckBeamMP, um zu testen, ob die Regel funktioniert.</p>
|
||||
<div data-md-type="block_html">
|
||||
<form action="https://check.beammp.com/api/v2/beammp" method="get" target="_blank">
|
||||
<label for="ip">IP Adresse:</label>
|
||||
<input type="text" id="ip" name="ip"><br>
|
||||
<label for="port">Port:</label>
|
||||
<input type="text" id="port" name="port"><br>
|
||||
<input type="submit" value="CheckBeamMP">
|
||||
</form>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<div data-md-type="block_html"></div>
|
||||
|
||||
## Die ausführliche Anleitung
|
||||
|
||||
@@ -73,18 +70,14 @@ Wenn du dies geschafft hast, fahre direkt mit [Schritt 2](port-forwarding.md#2-l
|
||||
|
||||
#### 1.1. Finde deine aktuelle IP-Adresse, Gateway und DNS-Server:
|
||||
|
||||
Bevor wir eine statische IP-Adresse einrichten können, benötigen wir deine aktuellen Netzwerkeinstellungen.
|
||||
Notiere diese, halte also ein Notepadfenster bereit.
|
||||
Für diesen Schritt verwenden wir die Eingabeaufforderung.
|
||||
Bevor wir eine statische IP-Adresse einrichten können, benötigen wir deine aktuellen Netzwerkeinstellungen. Notiere diese, halte also ein Notepadfenster bereit. Für diesen Schritt verwenden wir die Eingabeaufforderung.
|
||||
|
||||
Öffne die Eingabeaufforderung. Die drei wichtigsten Möglichkeiten sind:
|
||||
|
||||
- Drücke die Windows-Taste, gebe dann „cmd“ ein und drücke die Eingabetaste, wenn „Eingabeaufforderung“ hervorgehoben ist.
|
||||
|
||||
|
||||
<figure class="image image_resized" style="width:62%;" markdown>
|
||||

|
||||
</figure>
|
||||
<figure class="image image_resized" style="width:62%;" markdown="">  </figure>
|
||||
|
||||
Sobald du dich in der Eingabeaufforderung befindest, führe den folgenden Befehl aus:
|
||||
|
||||
@@ -92,31 +85,22 @@ Sobald du dich in der Eingabeaufforderung befindest, führe den folgenden Befehl
|
||||
ipconfig /all
|
||||
```
|
||||
|
||||
Du wirst eine Menge an Daten sehen.
|
||||
Wenn du virtuelle oder mehrere Netzwerkadapter verwendest, werden noch mehr Daten angezeigt.
|
||||
Bei der Installation von Hyper-V oder Docker werden häufig viele virtuelle Adapter angezeigt.
|
||||
Du wirst eine Menge an Daten sehen. Wenn du virtuelle oder mehrere Netzwerkadapter verwendest, werden noch mehr Daten angezeigt. Bei der Installation von Hyper-V oder Docker werden häufig viele virtuelle Adapter angezeigt.
|
||||
|
||||
<figure class="image image_resized" style="width:62%;" markdown>
|
||||

|
||||
</figure>
|
||||
|
||||
Es wird empfohlen, für den Betrieb dieses Servers eine kabelgebundene Netzwerkverbindung zu verwenden. Eine drahtlose Verbindung funktioniert jedoch auch.
|
||||
Suche in dieser Liste nach einem Adapter mit aktiver Internetverbindung. Scrolle durch die Liste und suche einen Adapter mit zugewiesenem Standard-Gateway.
|
||||
Viele virtuelle Adapter verfügen über kein Standard-Gateway.
|
||||
<figure class="image image_resized" style="width:62%;" markdown="">  </figure>
|
||||
|
||||
Nachfolgend findest du Beispiele für lokale IPv4-Adressen, die mindestens einer der Adapter haben sollte.
|
||||
Notiere dir die Informationen deines Adapters.
|
||||
Es wird empfohlen, für den Betrieb dieses Servers eine kabelgebundene Netzwerkverbindung zu verwenden. Eine drahtlose Verbindung funktioniert jedoch auch. Suche in dieser Liste nach einem Adapter mit aktiver Internetverbindung. Scrolle durch die Liste und suche einen Adapter mit zugewiesenem Standard-Gateway. Viele virtuelle Adapter verfügen über kein Standard-Gateway.
|
||||
|
||||
Nachfolgend findest du Beispiele für lokale IPv4-Adressen, die mindestens einer der Adapter haben sollte. Notiere dir die Informationen deines Adapters.
|
||||
|
||||
- 192.168.xx
|
||||
- 10.xxx
|
||||
- 172.16.xx – 172.31.xx
|
||||
|
||||
Subnetzmaske (höchstwahrscheinlich 255.255.255.0)
|
||||
</br>
|
||||
Standard-Gateway (höchstwahrscheinlich 192.168.0.1 oder 192.168.1.1)
|
||||
Subnetzmaske (höchstwahrscheinlich 255.255.255.0) Standard-Gateway (höchstwahrscheinlich 192.168.0.1 oder 192.168.1.1)
|
||||
|
||||
!!! Info „Beachte“
|
||||
BeamMP unterstützt derzeit kein IPv6 zum Hosten eines Servers.
|
||||
!!! Info „Beachte“ BeamMP unterstützt derzeit kein IPv6 zum Hosten eines Servers.
|
||||
|
||||
#### 1.2. Adaptereinstellungen ändern
|
||||
|
||||
@@ -127,24 +111,17 @@ Nun müssen wir die Einstellungen deines Netzwerkadapters ändern, damit dein P
|
||||
- Drücke die Eingabetaste
|
||||
|
||||
|
||||
<figure class="image image_resized" style="width:62%;" markdown>
|
||||

|
||||
</figure>
|
||||
<figure class="image image_resized" style="width:62%;" markdown="">  </figure>
|
||||
|
||||
Du solltest eine Liste der Netzwerkverbindungen auf deinem Computer sehen.
|
||||
Wenn du einen Hyper-V oder Docker installiert hast, kann es viele davon geben. Suche nach Adaptern, die nicht „Hyper-V“ heißen.
|
||||
Du solltest eine Liste der Netzwerkverbindungen auf deinem Computer sehen. Wenn du einen Hyper-V oder Docker installiert hast, kann es viele davon geben. Suche nach Adaptern, die nicht „Hyper-V“ heißen.
|
||||
|
||||
|
||||
<figure class="image image_resized" style="width:62%;" markdown>
|
||||

|
||||
</figure>
|
||||
<figure class="image image_resized" style="width:62%;" markdown="">  </figure>
|
||||
|
||||
Klicke mit der rechten Maustaste auf deinen Adapter und wähle Eigenschaften. Wenn `Internet Protocol Version 4` nicht aktiviert ist, handelt es sich um den falschen Adapter. Wähle einen anderen.
|
||||
|
||||
|
||||
<figure class="image image_resized" style="width:62%;" markdown>
|
||||

|
||||
</figure>
|
||||
<figure class="image image_resized" style="width:62%;" markdown="">  </figure>
|
||||
|
||||
Doppelklicken Sie auf `Internet Protocol Version 4` Ändern `Obtain an IP address automatically` beziehen in `Use the following IP address` .
|
||||
|
||||
@@ -156,9 +133,7 @@ Alternativ kannst du anstelle deines DNS-Servers entweder die CloudFlare- oder G
|
||||
- Google DNS: 8.8.8.8, 8.8.4.4
|
||||
|
||||
|
||||
<figure class="image image_resized" style="width:62%;" markdown>
|
||||

|
||||
</figure>
|
||||
<figure class="image image_resized" style="width:62%;" markdown="">  </figure>
|
||||
|
||||
Klicke auf „OK“ und dann erneut auf „OK“. Dein Adapter ist nun von DHCP auf statisch umgestellt. Surfe im Internet, um sicherzustellen, dass du weiterhin eine Internetverbindung hast. Falls nicht, ändere deine Einstellungen wieder auf „IP-Adresse automatisch beziehen“ und versuche die nächste Methode.
|
||||
|
||||
@@ -177,12 +152,12 @@ Du solltest nun den Anmeldebildschirm deines Routers sehen. Nicht alle Router er
|
||||
|
||||
Einige der gebräuchlichsten werkseitigen Benutzernamen und Passwörter sind hier aufgeführt:
|
||||
|
||||
| Username | Passwort |
|
||||
| -------- | --- |
|
||||
| admin | admin |
|
||||
| admin | password |
|
||||
| {leer} | admin |
|
||||
| {leer} | password |
|
||||
Username | Passwort
|
||||
--- | ---
|
||||
admin | admin
|
||||
admin | password
|
||||
{leer} | admin
|
||||
{leer} | password
|
||||
|
||||
Probiere verschiedene Kombinationen aus „Administrator“, „Passwort“ und lasse die Einträge leer. *Lasse den Wert bei „Leer“ leer.*
|
||||
|
||||
@@ -202,17 +177,11 @@ Suche den Abschnitt zur Portweiterleitung in der Weboberfläche deines Routers.
|
||||
|
||||
#### 3.2. Gebe die Details ein
|
||||
|
||||
Sobald du den Bereich für die Portweiterleitung gefunden hast, kannst du die erforderlichen Informationen eingeben.
|
||||
Dein Router bietet dir die Möglichkeit, die weiterzuleitenden Ports und die Ziel-IP-Adresse für diese Portweiterleitung einzugeben. Wenn dein Router sowohl interne als auch externe Ports angibt, achte darauf, dass diese identisch sind.
|
||||
Sobald du den Bereich für die Portweiterleitung gefunden hast, kannst du die erforderlichen Informationen eingeben. Dein Router bietet dir die Möglichkeit, die weiterzuleitenden Ports und die Ziel-IP-Adresse für diese Portweiterleitung einzugeben. Wenn dein Router sowohl interne als auch externe Ports angibt, achte darauf, dass diese identisch sind.
|
||||
|
||||
BeamMP erfordert sowohl UDP- als auch TCP-Port 30814 (es sei denn, du hast diesen in deiner [ServerConfig.toml](create-a-server.md#4-configuration) geändert).
|
||||
|
||||
!!!! info "Hinweis"
|
||||
Der **Standardport** ist **30814.** Du kannst aber auch andere Ports größer als 1024 und kleiner als 65535 wählen. Notiere dir deine Wahl, falls diese nicht 30814 ist. Du musst sowohl **TCP** als auch **UDP** weiterleiten.
|
||||
</br>
|
||||
Es wird empfohlen, den Standardport beizubehalten, da dieser höchstwahrscheinlich nicht von einem anderen Dienst auf Ihrem PC verwendet wird.
|
||||
</br>
|
||||
Wenn du jedoch mehrere Server auf einem Rechner hostest, benötigt jeder Server einen anderen Port. Server 1: 30814, Server 2: 30815 zum Beispiel.
|
||||
!!!! info "Hinweis" Der **Standardport** ist **30814.** Du kannst aber auch andere Ports größer als 1024 und kleiner als 65535 wählen. Notiere dir deine Wahl, falls diese nicht 30814 ist. Du musst sowohl **TCP** als auch **UDP** weiterleiten. Es wird empfohlen, den Standardport beizubehalten, da dieser höchstwahrscheinlich nicht von einem anderen Dienst auf Ihrem PC verwendet wird. Wenn du jedoch mehrere Server auf einem Rechner hostest, benötigt jeder Server einen anderen Port. Server 1: 30814, Server 2: 30815 zum Beispiel.
|
||||
|
||||
Auf einigen Routern muss man möglicherweise zwei Regeln erstellen, eine für UDP und eine für TCP, während andere praktisch sind und dir beides mit einer einzigen Regel ermöglichen!
|
||||
|
||||
@@ -225,7 +194,7 @@ Es gibt verschiedene Möglichkeiten, die Verbindung zu testen.
|
||||
Wir empfehlen die Verwendung unseres Tools **CheckBeamMP**, da dieses auf BeamMP-spezifische Probleme und Protokolle testet.
|
||||
|
||||
<form action="https://check.beammp.com/api/v2/beammp" method="get" target="_blank">
|
||||
<label for="ip">IP adress:</label>
|
||||
<label for="ip">IP Adresse:</label>
|
||||
<input type="text" id="ip" name="ip"><br>
|
||||
<label for="port">Port:</label>
|
||||
<input type="text" id="port" name="port"><br>
|
||||
@@ -234,17 +203,17 @@ Wir empfehlen die Verwendung unseres Tools **CheckBeamMP**, da dieses auf BeamMP
|
||||
|
||||
Dies kann durch die Abfrage deiner öffentlichen IPv4-Adresse erfolgen. Auch hierfür gibt es verschiedene Möglichkeiten. Die häufigste Methode ist die Nutzung der Website [whatsmyip.org](https://whatsmyip.org/) . Diese einfache Website zeigt deine öffentliche IP-Adresse an. Du solltest nach einer IP-Adresse im Format xxx.xxx.xxx.xxx suchen.
|
||||
|
||||
Besuche den folgenden Link und ersetzen Sie "IP" durch deine tatsächliche IPv4-Adresse und "Port" durch den Port deines Servers. Achte darauf, keine Leerzeichen zu hinterlassen.
|
||||
https://check.beammp.com/api/v2/beammp/ip/port
|
||||
Besuche den folgenden Link und ersetzen Sie "IP" durch deine tatsächliche IPv4-Adresse und "Port" durch den Port deines Servers. Achte darauf, keine Leerzeichen zu hinterlassen. https://check.beammp.com/api/v2/beammp/ip/port
|
||||
|
||||
!!! success "status: ok"
|
||||
|
||||
Wenn du die obige Ausgabe erhältst, kannst du des jetzt deinem Server beitreten!
|
||||
Es gibt zwei Möglichkeiten, beizutreten: entweder direkt mit den Daten, die du in probablyup eingegeben hast, oder, wenn dein Server auf „öffentlich“ eingestellt ist, über die Serverliste.
|
||||
Da du einen Server vor Ort hostest, verwenden 127.0.0.1 (localhost), wenn der Server auf demselben PC läuft, auf dem du spielst, oder die LAN-IPv4 des lokalen Computers, auf dem der Server läuft.
|
||||
Wenn du die obige Ausgabe erhältst, kannst du des jetzt deinem Server beitreten!
|
||||
Es gibt zwei Möglichkeiten, beizutreten: entweder direkt mit den Daten, die du in probablyup eingegeben hast, oder, wenn dein Server auf „öffentlich“ eingestellt ist, über die Serverliste.
|
||||
Da du einen Server vor Ort hostest, verwenden 127.0.0.1 (localhost), wenn der Server auf demselben PC läuft, auf dem du spielst, oder die LAN-IPv4 des lokalen Computers, auf dem der Server läuft.
|
||||
|
||||
!!! failure "status: error"
|
||||
|
||||
Wenn die Verbindung vollständig fehlschlägt, verwendet dein Anbieter möglicherweise CGNAT (Carrier Grade Network Address Translation). Weitere Informationen findest du unter [Wie kann ich auf CGNAT prüfen?](../FAQ/How-to-check-for-CGNAT.md),
|
||||
oder öffne ein Server-Support-Ticket auf unserem [Discord-Server](https://discord.gg/beammp) im Kanal „#support“ und einer unserer Mitarbeiter wird sich um dein Ticket kümmern!
|
||||
Wenn du nur siehst, dass TCP funktioniert und UDP fehlschlägt, überprüfe die Firewall- und Portweiterleitungsregeln erneut.
|
||||
Wenn die Verbindung vollständig fehlschlägt, verwendet dein Anbieter möglicherweise CGNAT (Carrier Grade Network Address Translation). Weitere Informationen findest du unter [Wie kann ich auf CGNAT prüfen?](../FAQ/How-to-check-for-CGNAT.md),
|
||||
oder öffne ein Server-Support-Ticket auf unserem [Discord-Server](https://discord.gg/beammp) im Kanal „#support“ und einer unserer Mitarbeiter wird sich um dein Ticket kümmern!
|
||||
Wenn du nur siehst, dass TCP funktioniert und UDP fehlschlägt, überprüfe die Firewall- und Portweiterleitungsregeln erneut.
|
||||
|
||||
|
||||
@@ -1,41 +1,41 @@
|
||||
## Why do I need to deactivate my mods?
|
||||
## Why do I have to deactivate/remove my mods?
|
||||
|
||||
In BeamMP, the Server you decide to connect to, provides the necessary mods. These get downloaded and activated automatically upon connecting.
|
||||
Having local mods installed and active often leads to BeamMP not functioning properly, even if you have just one additional mod besides BeamMP.
|
||||
|
||||
!!! warning
|
||||
|
||||
Remove any mods you have placed in the BeamNG.Drive\content\ or sub-folders. That location is NOT meant for the installing mods and can lead to issues as stated in the `DO_NOT_INSTALL_MODS_HERE.txt` file, located in the same directory.
|
||||
|
||||
!!! quote "DO_NOT_INSTALL_MODS_HERE.txt"
|
||||
|
||||
Do NOT copy mods into this folder: it can lead to broken mods, slower installation of updates, a broken mod manager, broken Safe Mode and others.
|
||||
|
||||
|
||||
## How do I deactivate/remove my mods?
|
||||
|
||||
There are 3 options to resolve possible issues when using BeamMP.
|
||||
There are 3 options to resolve possible issues caused by mods with using BeamMP.
|
||||
|
||||
### 1. Deactivate mods
|
||||
Before joining any server, make sure you have no mods besides 'multiplayerbeammp' enabled.
|
||||
If the game freezes or you still have issues, refer to the next option
|
||||
If this method does not work, for example the game freezes / shows a blackscreen, or you still have issues, refer to the next option.
|
||||
|
||||
### 2. Creating a new Userfolder
|
||||
Open the BeamNG.Drive userfolder and rename the `current` folder to for example `current_old`. Close BeamNG.drive before renaming it.
|
||||
Open the BeamNG.Drive userfolder and rename the `current` folder to for example `current_old`. Close BeamNG.drive before renaming the folder.
|
||||
The result should be a clean new userfolder.
|
||||

|
||||
|
||||
### 3. Removing mods from the content folders.
|
||||
To access the Beamng.drive\content\ folder and clean the folder of any mods, open the installation location of BeamNG.drive.
|
||||
Right click the `content` folder and delete it. Proceed to verify the game files via Steam or Epic Games. This is going to download the files again.
|
||||
??? question "My settings and configs are gone! How can I restore them?"
|
||||
|
||||
If you have renamed the userfolder, you forced the game to create a new, clean userfolder. You may copy the 'settings' and 'vehicles' folder from the folder you renamed (e.g. `current_old`) to the new folder it created.
|
||||
Make sure BeamNG.Drive is closed and replace all elements in the location you want to copy the folders to. You should now have all configs and settings as they were before.
|
||||
|
||||
!!! warning "Be careful when moving back files/folders to the new userfolder.
|
||||
|
||||
If you resolved any issues by renaming the userfolder, moving back the old files may cause any issues you had to possibly re-occur.
|
||||
|
||||
After you are done, start BeamNG.Drive via the BeamMP-Launcher and you should have 'multiplayerbeammp' as your only enabled mod available in the repository as well as the button on the Main Menu to enter BeamMP.
|
||||
If you still have issues joining modded server, they likely provide broken/outdated mods.
|
||||
|
||||
### 4. Cleaning up the BeamMP-Launcher cache
|
||||
### 3. Cleaning up the BeamMP-Launcher cache.
|
||||
To clean up cached mods from the BeamMP directories, go to the installation location of your BeamMP-Launcher. By default, the path would be 'C:\Users\AppData\BeamMP-Launcher\'. In there, you will find a 'Resources' folder.
|
||||
Delete the folder to delete all cached mods. This can be helpful if you need more space on your disk or want to clean out oudated BeamNG mods.
|
||||
|
||||
!!! question "My settings and configs are gone! How can I restore them?"
|
||||
### 4. Removing mods from the content folders.
|
||||
If you have placed mods in the content folder, you should remove them.
|
||||
To access the Beamng.drive\content\ folder and clean the folder of any mods, open the installation location of BeamNG.drive.
|
||||
Right click the `content` folder and delete it. Proceed to verify the game files via Steam or Epic Games. This is going to download the base files again.
|
||||
|
||||
If you renamed the userfolder, you forced the game to create a new, clean userfolder. You may copy the 'settings' and 'vehicles' folder from the folder you renamed (e.g. `current_old`) to the new folder it created.
|
||||
Make sure BeamNG.Drive is closed and replace all elements in the location you want to copy the folders to. You should now have all configs and settings as they were before.
|
||||
??? quote "DO_NOT_INSTALL_MODS_HERE.txt"
|
||||
|
||||
Do NOT copy mods into this folder: it can lead to broken mods, slower installation of updates, a broken mod manager, broken Safe Mode and others.
|
||||
@@ -12,25 +12,37 @@
|
||||
|
||||
We take no responsibility for any content on any externally linked services or websites.
|
||||
|
||||
## 1. Firewall exclusion for the BeamMP-Launcher.
|
||||
## 1. Defender Firewall exclusion for the BeamMP-Launcher.
|
||||
|
||||
1. Open the `Windows Defender Firewall with advanced setting`.
|
||||
2. In the Window, click `Inbound` to open the inbound exclusions tab.
|
||||
3. Click `Create new rule` in the top right to create a new exclusion.
|
||||
4. Select `Program` to create a program specific exclusion.
|
||||
5. Enter the full qualified path towards the `BeamMP-Launcher.exe`. By default, this would be `%appdata%\BeamMP-Launcher\BeamMP-Launcher.exe` without quotes.
|
||||
5. Enter the full qualified path towards the `BeamMP-Launcher.exe`. The default would be `%appdata%\BeamMP-Launcher\BeamMP-Launcher.exe` (without quotes).
|
||||
6. Make sure to allow the connection
|
||||
7. Give the exclusion a name (e.g. "BeamMP-Launcher") and save it.
|
||||
8. Restart your PC.
|
||||
9. Restart your PC.
|
||||
|
||||
## 2. Antivirus exclsuion for the BeamMP-Launcher.
|
||||
## 1.1 Defender Firewwall exclusion for the BeamMP-Server.
|
||||
|
||||
1. Open the `Windows Defender Firewall with advanced setting`.
|
||||
2. In the Window, click `Inbound` to open the inbound exclusions tab.
|
||||
3. Click `Create new rule` in the top right to create a new exclusion.
|
||||
4. Select `Port` to create a program specific exclusion.
|
||||
5. Enter the same port as in the ServerConfig.toml.
|
||||
6. Enter the full qualified path towards the `BeamMP-Server.exe`. The file is located whereever you placed it after downloading it.
|
||||
7. Make sure to allow the connection
|
||||
8. Give the exclusion a name (e.g. "BeamMP-Server") and save it.
|
||||
9. Restart your PC.
|
||||
|
||||
## 2. Defender Antivirus exclsuion for the BeamMP-Launcher/Server.
|
||||
|
||||
1. Open the `Windows Security` app.
|
||||
2. Click the first item `virus and threat protection`.
|
||||
3. Click `Manage settings` beneath "Virus & threat protection settings".
|
||||
4. Scroll down to navigate to the `Exclusions` tab.
|
||||
5. There, click 'Add an exclusion' and select `process`.
|
||||
6. Enter `BeamMP-Launcher.exe` into the field and save it.
|
||||
6. Enter `BeamMP-Launcher.exe` or `BeamMP-Server.exe`into the field and save it.
|
||||
7. Restart your PC.
|
||||
|
||||
## Still facing issues?
|
||||
|
||||
@@ -10,10 +10,11 @@ List of commonly asked questions.
|
||||
There is a full guide on how to install BeamMP on Windows, you can find it [here](https://docs.beammp.com/game/getting-started/).
|
||||
|
||||
---
|
||||
### **Does BeamMP work on a cracked version of BeamNG?**
|
||||
### **Does BeamMP work with pirated / modified versions of BeamNG?**
|
||||
|
||||
BeamMP will not work with pirated or outdated versions of BeamNG.drive.
|
||||
The BeamMP support team does not offer support for issues with pirated / outdated copies.
|
||||
Modifications such as, but not limited to, 3rd party mods, may interfere with BeamMP. (See [How to clear mods](https://github.com/Protogen187/Docs/blob/main/docs/en/FAQ/Clearing-mods.md))
|
||||
The BeamMP support team is unable to provide support for issues related to: pirated, outdated or otherwise modified versions of BeamNG.drive.
|
||||
|
||||
---
|
||||
### **Does BeamMP work on linux?**
|
||||
@@ -23,7 +24,7 @@ The Client is not officially supported on Linux. However, you can follow our [gu
|
||||
---
|
||||
### **Why is the launcher flagged by my antivirus or by Windows Defender**
|
||||
|
||||
Some antivirus programs may flag BeamMP as a threat, due to it interacting with the network and other stuff. There are **no viruses** in any of the code. The code for the launcher, server, and lua client can be found on our [GitHub](https://github.com/BeamMP).
|
||||
Some antivirus programs may flag BeamMP as a threat, due to it interacting with the network and other factors. There are **no viruses** in any of the code. The code for the launcher, server, and lua client can be found on our [GitHub](https://github.com/BeamMP).
|
||||
|
||||
---
|
||||
### **I have poor gameplay performance, what should I do?**
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
# Players FAQ
|
||||
|
||||
## How do I link my Discord account?
|
||||
Linking your Discord and BeamMP account is a new feature to BeamMP. To do this you will need send `!link` as a message to the [BeamMP Accounts](https://discordapp.com/channels/@me/1201234743568634026/) bot.
|
||||
The bot will respond with a link for you to sign into your BeamMP account. Simply sign in with your BeamMP account, once done you will receive a second message saying that it has successfully linked your accounts. 🎉
|
||||
Linking your Discord and BeamMP account is a new feature to BeamMP. To do this go to your [Forum Account Preferences](https://forum.beammp.com/my/preferences/account) and connect your Discord account under "Associated Accounts" (this is only visible when 2FA for the forum is disabled).
|
||||
|
||||
## How do I get early access?
|
||||
|
||||
@@ -14,7 +13,7 @@ Boosting gives you +4 Server keys in addition to EA benefits.
|
||||
|
||||
Please ensure you do the following to automatically receive your perks:
|
||||
|
||||
1. Link your Discord account on Patreon to receive the Roles and Access in the Discord server.
|
||||
1. Link your Discord account on [Patreon](https://www.patreon.com/settings/apps/discord) to receive the Roles and Access in the Discord server.
|
||||
2. Please ensure you use the same email address on Patreon as you do for your BeamMP account on the [Forum](https://forum.beammp.com/).
|
||||
|
||||
Please be patient, it can take a few hours, sometimes up to 12, for the system to sync. If you have not received your perks after 12 hours and have completed the above steps please contact BeamMP support.
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
!!! warning "This site is under construction!"
|
||||
|
||||
This site is being actively worked on.
|
||||
|
||||
Feel you could help? Please do by clicking on the page with a pencil on the right!
|
||||
|
||||
This can be done any page too.
|
||||
|
||||
# BeamNG.drive CEF Code Snippets
|
||||
|
||||
to-do
|
||||
@@ -0,0 +1,275 @@
|
||||
!!! warning "This site is under construction!"
|
||||
|
||||
This site is being actively worked on.
|
||||
|
||||
Feel you could help? Please do by clicking on the page with a pencil on the right!
|
||||
|
||||
This can be done any page too.
|
||||
|
||||
# BeamNG.drive CSS Code Snippets
|
||||
|
||||
## Common variables
|
||||
|
||||
=== "BeamNG CEF Orange"
|
||||
|
||||
```css
|
||||
var(--bng-orange) /*Common orange*/
|
||||
var(--bng-orange-shade1) /*70% opacity*/
|
||||
var(--bng-orange-shade2) /*40% opacity*/
|
||||
var(--bng-orange-shade1opaque)
|
||||
var(--bng-orange-shade2opaque)
|
||||
```
|
||||
|
||||
=== "Monochrome"
|
||||
|
||||
```css
|
||||
--- Monochrome
|
||||
var(--bng-black-8) /*80% opacity (duplicate --bng-black-o8)*/
|
||||
var(--bng-black-6) /*60% opacity (duplicate --bng-black-o6)*/
|
||||
var(--bng-black-4) /*40% opacity (duplicate --bng-black-o4)*/
|
||||
var(--bng-black-2) /*20% opacity (duplicate --bng-black-o2)*/
|
||||
|
||||
var(--dark-neutral-grey)
|
||||
var(--neutral-grey)
|
||||
var(--light-neutral-grey)
|
||||
var(--dark-grey)
|
||||
var(--dark-grey-alpha) /*80% opacity*/
|
||||
|
||||
var(--black-1) /*70% opacity*/
|
||||
var(--black-2) /*40% opacity (duplicate --bng-black-o4)*/
|
||||
|
||||
var(--white-1) /*80% opacity*/
|
||||
var(--white-2) /*40% opacity*/
|
||||
var(--white-3) /*20% opacity*/
|
||||
```
|
||||
|
||||
=== "BeamNG Vue UI Color Palette"
|
||||
|
||||
All of these support adding `-rgb` to the end of the variable name to convert them to raw red, green, blue values. Use -rgb like so: `rgba(var(--bng-orange-500-rgb), 0.5)` for 50% opacity bng-orange-500.
|
||||
|
||||
=== "Add Red"
|
||||
|
||||
```css
|
||||
var(--bng-add-red-50)
|
||||
var(--bng-add-red-100)
|
||||
var(--bng-add-red-200)
|
||||
var(--bng-add-red-300)
|
||||
var(--bng-add-red-400)
|
||||
var(--bng-add-red-500)
|
||||
var(--bng-add-red-550)
|
||||
var(--bng-add-red-600)
|
||||
var(--bng-add-red-650)
|
||||
var(--bng-add-red-700)
|
||||
var(--bng-add-red-750)
|
||||
var(--bng-add-red-800)
|
||||
var(--bng-add-red-850)
|
||||
var(--bng-add-red-900)
|
||||
```
|
||||
|
||||
=== "Orange"
|
||||
|
||||
```css
|
||||
var(--bng-orange-50)
|
||||
var(--bng-orange-100)
|
||||
var(--bng-orange-200)
|
||||
var(--bng-orange-300)
|
||||
var(--bng-orange-400)
|
||||
var(--bng-orange-500)
|
||||
var(--bng-orange-550)
|
||||
var(--bng-orange-600)
|
||||
var(--bng-orange-650)
|
||||
var(--bng-orange-700)
|
||||
var(--bng-orange-750)
|
||||
var(--bng-orange-800)
|
||||
var(--bng-orange-850)
|
||||
var(--bng-orange-900)
|
||||
```
|
||||
|
||||
=== "Ter Peach"
|
||||
|
||||
```css
|
||||
var(--bng-ter-peach-50)
|
||||
var(--bng-ter-peach-100)
|
||||
var(--bng-ter-peach-200)
|
||||
var(--bng-ter-peach-300)
|
||||
var(--bng-ter-peach-400)
|
||||
var(--bng-ter-peach-500)
|
||||
var(--bng-ter-peach-550)
|
||||
var(--bng-ter-peach-600)
|
||||
var(--bng-ter-peach-650)
|
||||
var(--bng-ter-peach-700)
|
||||
var(--bng-ter-peach-750)
|
||||
var(--bng-ter-peach-800)
|
||||
var(--bng-ter-peach-850)
|
||||
var(--bng-ter-peach-900)
|
||||
```
|
||||
|
||||
=== "Ter Yellow"
|
||||
|
||||
```css
|
||||
var(--bng-ter-yellow-50)
|
||||
var(--bng-ter-yellow-100)
|
||||
var(--bng-ter-yellow-200)
|
||||
var(--bng-ter-yellow-300)
|
||||
var(--bng-ter-yellow-400)
|
||||
var(--bng-ter-yellow-500)
|
||||
var(--bng-ter-yellow-550)
|
||||
var(--bng-ter-yellow-600)
|
||||
var(--bng-ter-yellow-650)
|
||||
var(--bng-ter-yellow-700)
|
||||
var(--bng-ter-yellow-750)
|
||||
var(--bng-ter-yellow-800)
|
||||
var(--bng-ter-yellow-850)
|
||||
var(--bng-ter-yellow-900)
|
||||
```
|
||||
|
||||
=== "Add Green"
|
||||
|
||||
```css
|
||||
var(--bng-add-green-50)
|
||||
var(--bng-add-green-100)
|
||||
var(--bng-add-green-200)
|
||||
var(--bng-add-green-300)
|
||||
var(--bng-add-green-400)
|
||||
var(--bng-add-green-500)
|
||||
var(--bng-add-green-600)
|
||||
var(--bng-add-green-700)
|
||||
var(--bng-add-green-800)
|
||||
var(--bng-add-green-900)
|
||||
```
|
||||
|
||||
=== "Baby Blue"
|
||||
|
||||
```css
|
||||
var(--bng-add-babyblue-50)
|
||||
var(--bng-add-babyblue-100)
|
||||
var(--bng-add-babyblue-200)
|
||||
var(--bng-add-babyblue-300)
|
||||
var(--bng-add-babyblue-400)
|
||||
var(--bng-add-babyblue-500)
|
||||
var(--bng-add-babyblue-550)
|
||||
var(--bng-add-babyblue-600)
|
||||
var(--bng-add-babyblue-650)
|
||||
var(--bng-add-babyblue-700)
|
||||
var(--bng-add-babyblue-750)
|
||||
var(--bng-add-babyblue-800)
|
||||
var(--bng-add-babyblue-850)
|
||||
var(--bng-add-babyblue-900)
|
||||
```
|
||||
|
||||
=== "Add Blue"
|
||||
|
||||
```css
|
||||
var(--bng-add-blue-50)
|
||||
var(--bng-add-blue-100)
|
||||
var(--bng-add-blue-200)
|
||||
var(--bng-add-blue-300)
|
||||
var(--bng-add-blue-400)
|
||||
var(--bng-add-blue-500)
|
||||
var(--bng-add-blue-600)
|
||||
var(--bng-add-blue-700)
|
||||
var(--bng-add-blue-800)
|
||||
var(--bng-add-blue-900)
|
||||
```
|
||||
|
||||
=== "Indigo Blue"
|
||||
|
||||
```css
|
||||
var(--bng-add-indigoblue-50)
|
||||
var(--bng-add-indigoblue-100)
|
||||
var(--bng-add-indigoblue-200)
|
||||
var(--bng-add-indigoblue-300)
|
||||
var(--bng-add-indigoblue-400)
|
||||
var(--bng-add-indigoblue-500)
|
||||
var(--bng-add-indigoblue-550)
|
||||
var(--bng-add-indigoblue-600)
|
||||
var(--bng-add-indigoblue-650)
|
||||
var(--bng-add-indigoblue-700)
|
||||
var(--bng-add-indigoblue-750)
|
||||
var(--bng-add-indigoblue-800)
|
||||
var(--bng-add-indigoblue-850)
|
||||
var(--bng-add-indigoblue-900)
|
||||
```
|
||||
|
||||
=== "Add Magenta"
|
||||
|
||||
```css
|
||||
var(--bng-add-magenta-50)
|
||||
var(--bng-add-magenta-100)
|
||||
var(--bng-add-magenta-200)
|
||||
var(--bng-add-magenta-300)
|
||||
var(--bng-add-magenta-400)
|
||||
var(--bng-add-magenta-500)
|
||||
var(--bng-add-magenta-550)
|
||||
var(--bng-add-magenta-600)
|
||||
var(--bng-add-magenta-650)
|
||||
var(--bng-add-magenta-700)
|
||||
var(--bng-add-magenta-750)
|
||||
var(--bng-add-magenta-800)
|
||||
var(--bng-add-magenta-850)
|
||||
var(--bng-add-magenta-900)
|
||||
```
|
||||
|
||||
=== "Ter Blue Gray"
|
||||
|
||||
```css
|
||||
var(--bng-ter-blue-gray-50)
|
||||
var(--bng-ter-blue-gray-100)
|
||||
var(--bng-ter-blue-gray-200)
|
||||
var(--bng-ter-blue-gray-300)
|
||||
var(--bng-ter-blue-gray-400)
|
||||
var(--bng-ter-blue-gray-500)
|
||||
var(--bng-ter-blue-gray-550)
|
||||
var(--bng-ter-blue-gray-600)
|
||||
var(--bng-ter-blue-gray-650)
|
||||
var(--bng-ter-blue-gray-700)
|
||||
var(--bng-ter-blue-gray-750)
|
||||
var(--bng-ter-blue-gray-800)
|
||||
var(--bng-ter-blue-gray-850)
|
||||
var(--bng-ter-blue-gray-900)
|
||||
```
|
||||
|
||||
=== "Cool Gray"
|
||||
|
||||
```css
|
||||
var(--bng-cool-gray-50)
|
||||
var(--bng-cool-gray-100)
|
||||
var(--bng-cool-gray-200)
|
||||
var(--bng-cool-gray-300)
|
||||
var(--bng-cool-gray-400)
|
||||
var(--bng-cool-gray-500)
|
||||
var(--bng-cool-gray-550)
|
||||
var(--bng-cool-gray-600)
|
||||
var(--bng-cool-gray-650)
|
||||
var(--bng-cool-gray-700)
|
||||
var(--bng-cool-gray-750)
|
||||
var(--bng-cool-gray-800)
|
||||
var(--bng-cool-gray-850)
|
||||
var(--bng-cool-gray-900)
|
||||
```
|
||||
|
||||
=== "Other"
|
||||
|
||||
```css
|
||||
var(--bng-off-black) /*Used in Vue for buttons and some headers*/
|
||||
var(--bng-off-white) /*Used in Vue for interactable elements*/
|
||||
var(--bng-off-white-brighter) /*Used in Vue for headers*/
|
||||
```
|
||||
|
||||
=== "Extra color presets"
|
||||
|
||||
```css
|
||||
var(--bng-filter-orange) /*Filter preset to force SVGs to use bng-orange*/
|
||||
var(--bng-black-o8) /*80% opacity*/
|
||||
var(--bng-black-o6) /*60% opacity*/
|
||||
var(--bng-black-o4) /*40% opacity*/
|
||||
var(--bng-black-o2) /*20% opacity*/
|
||||
```
|
||||
|
||||
=== "Corner rounding presets"
|
||||
|
||||
```css
|
||||
var(--bng-corners-1) /*0.25rem*/
|
||||
var(--bng-corners-2) /*0.50rem*/
|
||||
var(--bng-corners-3) /*1.00rem*/
|
||||
```
|
||||
@@ -0,0 +1,88 @@
|
||||
!!! warning "This site is under construction!"
|
||||
|
||||
This site is being actively worked on.
|
||||
|
||||
Feel you could help? Please do by clicking on the page with a pencil on the right!
|
||||
|
||||
This can be done any page too.
|
||||
# Creating an ImGui Window
|
||||
|
||||
This page covers how to create a basic ImGui window.
|
||||
|
||||
## Setup
|
||||
|
||||
Before using ImGui, some setup is required:
|
||||
|
||||
```lua
|
||||
local im = ui_imgui -- shortcut to prevent lookups all the time. should help with optimization
|
||||
local imguiExampleWindowOpen = im.BoolPtr(true)
|
||||
```
|
||||
|
||||
`imguiExampleWindowOpen` will be used to determine when this example window should be rendered.
|
||||
|
||||
## Window Rendering
|
||||
|
||||
ImGui windows and their contents must be recreated for every frame they should be displayed. This means that some form of onUpdate function is necessary to use ImGui.
|
||||
|
||||
```lua
|
||||
local function onUpdate()
|
||||
if worldReadyState == 2 then
|
||||
if imguiExampleWindowOpen[0] == true then
|
||||
imguiExample()
|
||||
end
|
||||
end
|
||||
end
|
||||
M.onUpdate = onUpdate
|
||||
```
|
||||
|
||||
This will run a function to create this example's window, so long as the level is fully loaded, and that the example window should be displaying.
|
||||
|
||||
## Window Content
|
||||
|
||||
If you're new to writing ImGui, think of it as a distant cousin of HTML:
|
||||
|
||||
* `im.SetNextWindowSize(im.ImVec2(x, y), im.Cond_FirstUseEver)` defines your viewport size if it hasn't already been defined
|
||||
* `im.Begin()` and `im.End()` is your `<body>` and `</body>`
|
||||
* `im.Text()` is your `<p></p>`
|
||||
|
||||
```lua
|
||||
local buttonPresses = 0
|
||||
|
||||
local function imguiExample()
|
||||
im.SetNextWindowSize(im.ImVec2(366, 100), im.Cond_FirstUseEver) -- prepare our window
|
||||
im.Begin("Hello World, I am a window") -- create a window with the title of "Hello World, I am a window"
|
||||
im.Indent() -- a... padding element
|
||||
im.Text("Hello World, I am text.") -- add a line of text, somewhat like a <p> element
|
||||
im.SameLine() -- Not really HTML. This appends the following element to the same line as the previous element.
|
||||
if im.Button("The Hello World Button") then -- Like <button>. This runs Lua when pressed.
|
||||
buttonPresses = buttonPresses + 1
|
||||
end
|
||||
if buttonPresses > 0 then
|
||||
im.Text("The Hello World Button has been pressed " .. buttonPresses .. " times!")
|
||||
else
|
||||
im.Text("The Hello World Button has not been pressed.")
|
||||
end
|
||||
im.Unindent() -- end the "padding element"
|
||||
im.End() -- complete our "canvas" so it can be drawn
|
||||
end
|
||||
```
|
||||
|
||||
You can add the following function to easily toggle visibility of the window:
|
||||
|
||||
```lua
|
||||
local function toggleExampleImgui()
|
||||
imguiExampleWindowOpen[0] = not imguiExampleWindowOpen[0]
|
||||
end
|
||||
```
|
||||
|
||||
## Result
|
||||
|
||||
<figure class="image image_resized" style="width:100%" markdown>
|
||||

|
||||
</figure>
|
||||
|
||||
When the The Hello World Button button is pressed, the counter below it will update to display the amount of times the The Hello World Button button has been pressed.
|
||||
|
||||
## Download
|
||||
|
||||
This tutorial is almost entirely based off of [StanleyDudek](https://github.com/StanleyDudek)'s ImGui example mod. You can download this example mod [here](../../../../assets/content/imguiExample.zip).
|
||||
@@ -0,0 +1,77 @@
|
||||
!!! warning "This site is under construction!"
|
||||
|
||||
This site is being actively worked on.
|
||||
|
||||
Feel you could help? Please do by clicking on the page with a pencil on the right!
|
||||
|
||||
This can be done any page too.
|
||||
|
||||
# BeamNG.drive ImGui Code Snippets
|
||||
|
||||
## Setup
|
||||
|
||||
### Setup ImGui
|
||||
|
||||
```lua
|
||||
local im = ui_imgui
|
||||
```
|
||||
|
||||
### Setup Window
|
||||
|
||||
```lua
|
||||
im.SetNextWindowSize(im.ImVec2(366, 100), im.Cond_FirstUseEver)
|
||||
```
|
||||
|
||||
### Create window
|
||||
|
||||
```lua
|
||||
im.Begin("Window Title") -- Create window
|
||||
im.End()
|
||||
```
|
||||
|
||||
## General
|
||||
|
||||
=== "Basic Formatting"
|
||||
|
||||
```lua
|
||||
im.Text("")
|
||||
im.TextWrapped("") -- automatic word wrap
|
||||
im.TextColored(im.ImVec4(0,1,0,1), "") -- R,G,B,A
|
||||
im.TextDisabled("") -- predefined style for disabled text
|
||||
|
||||
im.LabelText("", "")
|
||||
im.BulletText("") -- Bullet point with text
|
||||
im.SeparatorText("") -- Separator with centered text
|
||||
|
||||
im.Separator() -- might want a NewLine before these
|
||||
im.SameLine() -- horizontally append the following element to the previous element
|
||||
im.NewLine()
|
||||
|
||||
im.Spacing() -- small padding
|
||||
im.Indent()
|
||||
im.Unindent()
|
||||
```
|
||||
|
||||
=== "Inputs"
|
||||
|
||||
```lua
|
||||
im.Button("", im.ImVec2(0,0)) -- 0 = fit to content
|
||||
im.SmallButton("") -- Fit to content and slightly less padding
|
||||
im.ArrowButton("", 0) -- arg 1: string is not actually used? arg 2: 0 = left, 1 = right, 2 = up, 3 = down
|
||||
im.InvisibleButton("", im.ImVec2(0,0), ...) -- used for imgui cursor positioning?
|
||||
|
||||
im.Checkbox("", im.BoolPtr(false))
|
||||
|
||||
im.RadioButton1("", im.BoolPtr(false))
|
||||
im.RadioButton2("", im.IntPtr(), 0) -- arg. 3: 0 or 1 for disabled or enabled
|
||||
```
|
||||
|
||||
=== "Other"
|
||||
|
||||
```lua
|
||||
im.Bullet()
|
||||
|
||||
im.ProgressBar(0.5, im.ImVec2(0,0), "") -- arg 2: 0 for default width and/or height
|
||||
|
||||
im.TextUnformatted("", "") -- Second argument seems to crash the game
|
||||
```
|
||||
@@ -4,7 +4,6 @@ This documentation is unofficial and produced by the BeamMP Mod Team and the Bea
|
||||
## Understanding The File Structure
|
||||
...
|
||||
|
||||
|
||||
## Snippets
|
||||
|
||||
Helpful code snippets can be found here: [Snippets](snippets.md)
|
||||
Helpful code snippets can be found here: [Lua Snippets](lua-snippets.md)
|
||||
@@ -0,0 +1,381 @@
|
||||
!!! warning "This site is under construction!"
|
||||
|
||||
This site is being actively worked on.
|
||||
|
||||
Feel you could help? Please do by clicking on the page with a pencil on the right!
|
||||
|
||||
This can be done any page too.
|
||||
|
||||
# BeamNG.drive Lua Code Snippets
|
||||
|
||||
## World
|
||||
|
||||
### Drawing a marker & Vehicle detection
|
||||
|
||||
Drawing markers in the map can be one of the best ways to indicate to the user that there is some form of interaction that they can do there.
|
||||
|
||||
Drawing a marker is fairly easy. Here is an example of how the bus route marker is drawn:
|
||||
|
||||
```lua
|
||||
local function createBusMarker(markerName)
|
||||
local marker = createObject('TSStatic')
|
||||
marker:setField('shapeName', 0, "art/shapes/interface/position_marker.dae")
|
||||
marker:setPosition(vec3(0, 0, 0))
|
||||
marker.scale = vec3(1, 1, 1)
|
||||
marker:setField('rotation', 0, '1 0 0 0')
|
||||
marker.useInstanceRenderData = true
|
||||
marker:setField('instanceColor', 0, '1 1 1 0')
|
||||
marker:setField('collisionType', 0, "Collision Mesh")
|
||||
marker:setField('decalType', 0, "Collision Mesh")
|
||||
marker:setField('playAmbient', 0, "1")
|
||||
marker:setField('allowPlayerStep', 0, "1")
|
||||
marker:setField('canSave', 0, "0")
|
||||
marker:setField('canSaveDynamicFields', 0, "1")
|
||||
marker:setField('renderNormals', 0, "0")
|
||||
marker:setField('meshCulling', 0, "0")
|
||||
marker:setField('originSort', 0, "0")
|
||||
marker:setField('forceDetail', 0, "-1")
|
||||
marker.canSave = false
|
||||
marker:registerObject(markerName)
|
||||
scenetree.MissionGroup:addObject(marker)
|
||||
return marker
|
||||
end
|
||||
|
||||
-- this can then be called in a loop to setup your markers.
|
||||
-- NOTE: You should only do this once as part of your setup and not called on each frame.
|
||||
if #markers == 0 then
|
||||
for k,v in pairs(nameMarkers) do
|
||||
local mk = scenetree.findObject(v)
|
||||
if mk == nil then
|
||||
log('I', logTag,'Creating marker '..tostring(v))
|
||||
mk = createBusMarker(v)
|
||||
ScenarioObjectsGroup:addObject(mk.obj)
|
||||
end
|
||||
table.insert(markers, mk)
|
||||
end
|
||||
end
|
||||
```
|
||||
|
||||
Here is a custom marker example from [BeamNG-FuelStations](https://github.com/BeamMP/BeamNG-FuelStations/tree/master):
|
||||
|
||||
```lua
|
||||
local stations = [
|
||||
{ "location": [ -778.813, 485.973, 23.46 ], "type":"gas" },
|
||||
{ "location": [ 617.164, -192.107, 53.2 ], "type":"ev" },
|
||||
]
|
||||
|
||||
local function IsEntityInsideArea(pos1, pos2, radius)
|
||||
return pos1:distance(pos2) < radius
|
||||
end
|
||||
|
||||
local onUpdate = function (dt)
|
||||
for k, spot in pairs(stations) do -- loop through all spots on the current map
|
||||
local bottomPos = vec3(spot.location[1], spot.location[2], spot.location[3])
|
||||
local topPos = bottomPos + vec3(0,0,2) -- offset vec to get top position (2m tall)
|
||||
|
||||
local spotInRange = false -- is this spot in range? used for color
|
||||
local spotCompatible = false -- is this spot compatible?
|
||||
|
||||
if activeVeh then -- we have a car and its ours (if in mp)
|
||||
local vehPos = activeVeh:getPosition()
|
||||
|
||||
spotInRange = IsEntityInsideArea(vec3(vehPos.x, vehPos.y,vehPos.z), bottomPos, 1.5)
|
||||
|
||||
spotCompatible = activeFuelType == "any" or spot.type == "any" or activeFuelType == spot.type
|
||||
end
|
||||
|
||||
local spotColor = (spotInRange and spotCompatible) and activeColorMap[spot.type] or inactiveColorMap[spot.type] or ColorF(1,1,1,0.5)
|
||||
|
||||
debugDrawer:drawCylinder(bottomPos:toPoint3F(), topPos:toPoint3F(), 1, spotColor) --bottom, top, radius, color
|
||||
end
|
||||
end
|
||||
```
|
||||
|
||||
## User Interface
|
||||
|
||||
### Toast Notifications, Top right of screen
|
||||
|
||||
<figure class="image image_resized" style="width:75%" markdown>
|
||||

|
||||
</figure>
|
||||
|
||||
```lua
|
||||
--guihooks.trigger('toastrMsg', {type, title, msg, config = {timeOut}})
|
||||
guihooks.trigger('toastrMsg', {type = "info", title = "Info Message:", msg = "Info Message Text Here", config = {timeOut = 5000}})
|
||||
guihooks.trigger('toastrMsg', {type = "warning", title = "Warning Message:", msg = "Warning Message Text Here", config = {timeOut = 5000}})
|
||||
guihooks.trigger('toastrMsg', {type = "error", title = "Error Message:", msg = "Error Message Text Here", config = {timeOut = 5000}})
|
||||
```
|
||||
|
||||
### Message notifications, top left of screen by default in Messages app
|
||||
|
||||
This requires the 'Messages' or 'Messages & Tasks' UI app. Icons can be found at `ui\ui-vue\src\assets\fonts\bngIcons\svg\`
|
||||
|
||||
<figure class="image image_resized" style="width:75%" markdown>
|
||||

|
||||
</figure>
|
||||
|
||||
```lua
|
||||
--guihooks.trigger('Message', {msg, ttl, category, icon})
|
||||
--ui_message(msg, ttl, category, icon)
|
||||
guihooks.trigger('Message', {msg = "Message Text Here", ttl = 5.0, category = "arrow_upward", icon = "arrow_upward"})
|
||||
guihooks.trigger('Message', {msg = "Message Text Here", ttl = 5.0, category = "arrow_downward", icon = "arrow_downward"})
|
||||
guihooks.trigger('Message', {msg = "Message Text Here", ttl = 5.0, category = "flag", icon = "flag"})
|
||||
guihooks.trigger('Message', {msg = "Message Text Here", ttl = 5.0, category = "check", icon = "check"})
|
||||
guihooks.trigger('Message', {msg = "Message Text Here", ttl = 5.0, category = "check_circle", icon = "check_circle"})
|
||||
guihooks.trigger('Message', {msg = "Message Text Here", ttl = 5.0, category = "warning", icon = "warning"})
|
||||
guihooks.trigger('Message', {msg = "Message Text Here", ttl = 5.0, category = "error", icon = "error"})
|
||||
guihooks.trigger('Message', {msg = "Message Text Here", ttl = 5.0, category = "directions_car", icon = "directions_car"})
|
||||
guihooks.trigger('Message', {msg = "Message Text Here", ttl = 5.0, category = "star", icon = "star"})
|
||||
guihooks.trigger('Message', {msg = "Message Text Here", ttl = 5.0, category = "timeline", icon = "timeline"})
|
||||
guihooks.trigger('Message', {msg = "Message Text Here", ttl = 5.0, category = "save", icon = "save"})
|
||||
guihooks.trigger('Message', {msg = "Message Text Here", ttl = 5.0, category = "settings", icon = "settings"})
|
||||
```
|
||||
|
||||
### Center large or small display flash
|
||||
|
||||
<figure class="image image_resized" style="width:75%" markdown>
|
||||

|
||||
</figure>
|
||||
|
||||
<figure class="image image_resized" style="width:75%" markdown>
|
||||

|
||||
</figure>
|
||||
|
||||
```lua
|
||||
--guihooks.trigger('ScenarioFlashMessage', {{msg, ttl, sound, big}} ) -- requires RaceCountdown ui app
|
||||
guihooks.trigger('ScenarioFlashMessage', {{"Message", 5.0, 0, true}} )
|
||||
guihooks.trigger('ScenarioFlashMessage', {{"Message Text Here", 5.0, 0, false}} )
|
||||
|
||||
--countdown example, when all executed at once, the items are queued and will follow eachother after the previous ttl expires
|
||||
guihooks.trigger('ScenarioFlashMessage', {{"3", 1.0, "Engine.Audio.playOnce('AudioGui', 'event:UI_Countdown1')", true}})
|
||||
guihooks.trigger('ScenarioFlashMessage', {{"2", 1.0, "Engine.Audio.playOnce('AudioGui', 'event:UI_Countdown2')", true}})
|
||||
guihooks.trigger('ScenarioFlashMessage', {{"1", 1.0, "Engine.Audio.playOnce('AudioGui', 'event:UI_Countdown3')", true}})
|
||||
guihooks.trigger('ScenarioFlashMessage', {{"GO!", 3.0, "Engine.Audio.playOnce('AudioGui', 'event:UI_CountdownGo')", true}})
|
||||
|
||||
--another sound example
|
||||
guihooks.trigger('ScenarioFlashMessage', {{"Teleported!", 3.0, "Engine.Audio.playOnce('AudioGui', 'event:UI_Checkpoint')", false}})
|
||||
```
|
||||
|
||||
### Center mid-size persistent display
|
||||
|
||||
This requires the 'Race Realtime Display' UI app.
|
||||
|
||||
<figure class="image image_resized" style="width:75%" markdown>
|
||||

|
||||
</figure>
|
||||
|
||||
```lua
|
||||
--guihooks.trigger('ScenarioRealtimeDisplay', {msg = msg} ) -- requires Race Realtime Display ui app
|
||||
guihooks.trigger('ScenarioRealtimeDisplay', {msg = "Message Text Here"} )
|
||||
--these messages persist, clear with a blank string
|
||||
--if you are running live data, this is a good one to update rapidly (think timers, distance calcs, et cetera)
|
||||
guihooks.trigger('ScenarioRealtimeDisplay', {msg = ""} )
|
||||
```
|
||||
|
||||
### Confirmation Dialog
|
||||
|
||||
ConfirmationDialog is a simplistic popup with up to two buttons.
|
||||
|
||||
```lua
|
||||
-- Open a ConfirmationDialog with a title, body text, and up to two buttons
|
||||
guihooks.trigger("ConfirmationDialogOpen",
|
||||
"Example Title",
|
||||
"Example Body Text",
|
||||
"Okay",
|
||||
"", --gelua. empty string
|
||||
"Cancel",
|
||||
"" --gelua
|
||||
)
|
||||
|
||||
-- Close any open ConfirmationDialog with the provided title
|
||||
guihooks.trigger("ConfirmationDialogClose", "Example Title")
|
||||
```
|
||||
|
||||
<figure class="image image_resized" style="width:75%" markdown>
|
||||

|
||||
</figure>
|
||||
|
||||
Both fields of a button must be strings in order for the button to appear.
|
||||
|
||||
If the Okay button is provided, pressing the *OK / Primary action* action is equivalent to pressing the Okay button.
|
||||
|
||||
If the Cancel button is provided, pressing the *Menu* action is equivalent to pressing the Cancel button.
|
||||
|
||||
HTML is supported and can be used to add images/icons, for example.
|
||||
|
||||
Multiple can be displayed at once, displayed sequentially.
|
||||
|
||||
!!! bug
|
||||
|
||||
Providing no buttons prevents the player from escaping the dialog without using the console.
|
||||
|
||||
!!! bug
|
||||
|
||||
The SDF parts of the Minimap UI app remain visible while a ConfirmationDialog is active.
|
||||
|
||||
`#!lua guihooks.trigger('ShowApps', false)` to hide UI apps can be used as a hacky workaround.
|
||||
|
||||
<figure class="image image_resized" style="width:75%" markdown>
|
||||

|
||||
</figure>
|
||||
|
||||
### introPopupTutorial
|
||||
|
||||
introPopupTutorial is a highly customizable popup that is largely defined with embedded HTML. It is standard to load from a standalone HTML file located in `/gameplay/tutorials/pages/*/content.html`.
|
||||
|
||||
```lua
|
||||
guihooks.trigger("introPopupTutorial", {
|
||||
{
|
||||
content = readFile("/gameplay/tutorials/pages/template/content.html"):gsub("\r\n",""),
|
||||
flavour = "onlyOk"
|
||||
}
|
||||
})
|
||||
|
||||
guihooks.trigger("introPopupClose")
|
||||
```
|
||||
|
||||
<figure class="image image_resized" style="width:75%" markdown>
|
||||

|
||||
</figure>
|
||||
|
||||
`flavour` controls which buttons are displayed. Four flavours exist:
|
||||
|
||||
* `withLogbook`
|
||||
* Buttons: Career Logbook, Okay
|
||||
* `onlyOk`
|
||||
* Buttons: Okay
|
||||
* `onlyLogbook`
|
||||
* Buttons: Career Logbook
|
||||
* `noButtons`
|
||||
* Provides no buttons
|
||||
|
||||
!!! warning
|
||||
|
||||
When using the noButtons flavour on the page, providing no extra JavaScript in the page content to close the popup causes a softlock. Pages are not combined into one popup in this flavour. It is not recommended to use this flavour.
|
||||
|
||||
If multiple pages are provided, or the hook is triggered multiple times, then the pages are combined into the same popup. If the hook is triggered while a introPopup is active, or when a different introPopup type has already been triggered, then it is displayed in a separate popup after the existing popup is closed.
|
||||
|
||||
### introPopupCareer
|
||||
|
||||
introPopupCareer is an easy to use, but open ended popup that supports embedding HTML, if needed.
|
||||
|
||||
Flavours control which buttons are displayed and the default image aspect ratio. Four flavours exist:
|
||||
|
||||
* `default`
|
||||
* Default image aspect ratio: 16x9
|
||||
* Buttons: Later, Okay
|
||||
* `welcome`
|
||||
* Default image aspect ratio: 16x9
|
||||
* Buttons: Career Logbook, Okay
|
||||
* `branch-info`
|
||||
* Default image aspect ratio: 16x9
|
||||
* Buttons: Career Logbook, Okay
|
||||
* `garage`
|
||||
* Buttons: Later, Okay
|
||||
|
||||
```lua
|
||||
guihooks.trigger("introPopupCareer", {
|
||||
{
|
||||
title = "Example title",
|
||||
text = "Example text",
|
||||
image = "/gameplay/tutorials/pages/template/image.jpg",
|
||||
ratio = "16x9",
|
||||
flavour = "default"
|
||||
}
|
||||
})
|
||||
|
||||
guihooks.trigger("introPopupClose")
|
||||
```
|
||||
|
||||
<figure class="image image_resized" style="width:75%" markdown>
|
||||

|
||||
</figure>
|
||||
|
||||
If multiple pages are provided, or the hook is triggered multiple times, then the pages are combined into the same popup. If the hook is triggered while a introPopup is active, or when a different introPopup type has already been triggered, then it is displayed in a separate popup after the existing popup is closed.
|
||||
|
||||
!!! bug
|
||||
|
||||
The background blur has a minimum height, causing popups with short content to have excess blur below its window. Two main workarounds exist:
|
||||
|
||||
* Repeat `\n` and end with `#!html <div />` until the window covers the blur
|
||||
* Use an empty or missing `image` path and adjust the aspect ratio until the window covers the blur
|
||||
|
||||
### introPopupMission
|
||||
|
||||
introPopupMission is almost identical to introPopupCareer, but needs buttons to be defined rather than picking a preset for buttons.
|
||||
|
||||
Button styles are combined as *bng-button-*`style`. Built-in button styles are:
|
||||
|
||||
* `main` - orange
|
||||
* `secondary` - cyan
|
||||
* `attention` - red
|
||||
* `white` - white
|
||||
* `link` - translucent
|
||||
* `outline` - orange outline
|
||||
|
||||
```lua
|
||||
guihooks.trigger('introPopupMission', {
|
||||
title = "introPopupMission title",
|
||||
text = "introPopupMission description",
|
||||
image = "/gameplay/tutorials/pages/template/image.jpg",
|
||||
ratio = "16x9",
|
||||
buttons = {
|
||||
{ default=true, class="main", label="main button", clickLua="" },
|
||||
{ default=false, class="secondary", label="secondary button", clickLua="" },
|
||||
{ default=false, class="attention", label="attention button", clickLua="" },
|
||||
{ default=false, class="white", label="white button", clickLua="" },
|
||||
{ default=false, class="link", label="link button", clickLua="" },
|
||||
{ default=false, class="outline", label="outline button", clickLua="" }
|
||||
}
|
||||
})
|
||||
|
||||
guihooks.trigger("introPopupClose")
|
||||
```
|
||||
|
||||
<figure class="image image_resized" style="width:75%" markdown>
|
||||

|
||||
</figure>
|
||||
|
||||
If multiple pages are provided, or the hook is triggered multiple times, then the pages are combined into the same popup. If the hook is triggered while a introPopup is active, or when a different introPopup type has already been triggered, then it is displayed in a separate popup after the existing popup is closed.
|
||||
|
||||
!!! bug
|
||||
|
||||
The background blur has a minimum height, causing popups with short content to have excess blur below its window. Two main workarounds exist:
|
||||
|
||||
* Repeat `\n` and end with `#!html <div />` until the window covers the blur
|
||||
* Use an empty or missing `image` path and adjust the aspect ratio until the window covers the blur
|
||||
|
||||
### Dialogue
|
||||
|
||||
Dialogue is used in the *A Rocky Start* campaign to display information about a mission. It is a centered, vertically aligned popup with a specific layout. It does not support embedding HTML.
|
||||
|
||||
```lua
|
||||
ui_missionInfo.openDialogue({
|
||||
title = "Dialogue title",
|
||||
type = "Custom", -- isn't actually displayed
|
||||
typeName = "typeName",
|
||||
data = {
|
||||
{label = "objective", value = "reward"}
|
||||
-- add more...
|
||||
},
|
||||
buttons = {
|
||||
{action = "accept", text = "Accept", cmd = ""},
|
||||
{action = 'decline',text = "Decline", cmd = ""}
|
||||
-- add more...
|
||||
}
|
||||
})
|
||||
|
||||
ui_missionInfo.closeDialogue()
|
||||
```
|
||||
|
||||
<figure class="image image_resized" style="width:75%" markdown>
|
||||

|
||||
</figure>
|
||||
|
||||
Only one Dialogue can be displayed at once. Any existing Dialogue is overridden.
|
||||
|
||||
!!! info
|
||||
|
||||
`#!lua ui_missionInfo.closeDialogue()` must be used to close a dialogue.
|
||||
|
||||
Make sure you call this function when any button is pressed.
|
||||
@@ -1,154 +0,0 @@
|
||||
!!! warning "This site is under construction!"
|
||||
|
||||
This site is being actively worked on.
|
||||
|
||||
Feel you could help? Please do by clicking on the page with a pencil on the right!
|
||||
|
||||
This can be done any page too.
|
||||
|
||||
# BeamNG.drive Snippets
|
||||
|
||||
## Lua Code Snippets
|
||||
|
||||
### Drawing a marker & Vehicle detection
|
||||
|
||||
Drawing markers in the map can be one of the best ways to indicate to the user that there is some form of interaction that they can do there.
|
||||
|
||||
Drawing a marker is fairly easy. Here is an example of how the bus route marker is drawn:
|
||||
|
||||
```Lua
|
||||
local function createBusMarker(markerName)
|
||||
local marker = createObject('TSStatic')
|
||||
marker:setField('shapeName', 0, "art/shapes/interface/position_marker.dae")
|
||||
marker:setPosition(vec3(0, 0, 0))
|
||||
marker.scale = vec3(1, 1, 1)
|
||||
marker:setField('rotation', 0, '1 0 0 0')
|
||||
marker.useInstanceRenderData = true
|
||||
marker:setField('instanceColor', 0, '1 1 1 0')
|
||||
marker:setField('collisionType', 0, "Collision Mesh")
|
||||
marker:setField('decalType', 0, "Collision Mesh")
|
||||
marker:setField('playAmbient', 0, "1")
|
||||
marker:setField('allowPlayerStep', 0, "1")
|
||||
marker:setField('canSave', 0, "0")
|
||||
marker:setField('canSaveDynamicFields', 0, "1")
|
||||
marker:setField('renderNormals', 0, "0")
|
||||
marker:setField('meshCulling', 0, "0")
|
||||
marker:setField('originSort', 0, "0")
|
||||
marker:setField('forceDetail', 0, "-1")
|
||||
marker.canSave = false
|
||||
marker:registerObject(markerName)
|
||||
scenetree.MissionGroup:addObject(marker)
|
||||
return marker
|
||||
end
|
||||
|
||||
-- this can then be called in a loop to setup your markers.
|
||||
-- NOTE: You should only do this once as part of your setup and not called on each frame.
|
||||
if #markers == 0 then
|
||||
for k,v in pairs(nameMarkers) do
|
||||
local mk = scenetree.findObject(v)
|
||||
if mk == nil then
|
||||
log('I', logTag,'Creating marker '..tostring(v))
|
||||
mk = createBusMarker(v)
|
||||
ScenarioObjectsGroup:addObject(mk.obj)
|
||||
end
|
||||
table.insert(markers, mk)
|
||||
end
|
||||
end
|
||||
```
|
||||
|
||||
Here is a custom marker example from [BeamNG-FuelStations](https://github.com/BeamMP/BeamNG-FuelStations/tree/master):
|
||||
|
||||
```Lua
|
||||
local stations = [
|
||||
{ "location": [ -778.813, 485.973, 23.46 ], "type":"gas" },
|
||||
{ "location": [ 617.164, -192.107, 53.2 ], "type":"ev" },
|
||||
]
|
||||
|
||||
local function IsEntityInsideArea(pos1, pos2, radius)
|
||||
return pos1:distance(pos2) < radius
|
||||
end
|
||||
|
||||
local onUpdate = function (dt)
|
||||
for k, spot in pairs(stations) do -- loop through all spots on the current map
|
||||
local bottomPos = vec3(spot.location[1], spot.location[2], spot.location[3])
|
||||
local topPos = bottomPos + vec3(0,0,2) -- offset vec to get top position (2m tall)
|
||||
|
||||
local spotInRange = false -- is this spot in range? used for color
|
||||
local spotCompatible = false -- is this spot compatible?
|
||||
|
||||
if activeVeh then -- we have a car and its ours (if in mp)
|
||||
local vehPos = activeVeh:getPosition()
|
||||
|
||||
spotInRange = IsEntityInsideArea(vec3(vehPos.x, vehPos.y,vehPos.z), bottomPos, 1.5)
|
||||
|
||||
spotCompatible = activeFuelType == "any" or spot.type == "any" or activeFuelType == spot.type
|
||||
end
|
||||
|
||||
local spotColor = (spotInRange and spotCompatible) and activeColorMap[spot.type] or inactiveColorMap[spot.type] or ColorF(1,1,1,0.5)
|
||||
|
||||
debugDrawer:drawCylinder(bottomPos:toPoint3F(), topPos:toPoint3F(), 1, spotColor) --bottom, top, radius, color
|
||||
end
|
||||
end
|
||||
```
|
||||
|
||||
### guihooks examples
|
||||
#### Toast Notifications, Top right of screen
|
||||

|
||||
|
||||
```lua
|
||||
--guihooks.trigger('toastrMsg', {type, title, msg, config = {timeOut}})
|
||||
guihooks.trigger('toastrMsg', {type = "info", title = "Info Message:", msg = "Info Message Text Here", config = {timeOut = 5000}})
|
||||
guihooks.trigger('toastrMsg', {type = "warning", title = "Warning Message:", msg = "Warning Message Text Here", config = {timeOut = 5000}})
|
||||
guihooks.trigger('toastrMsg', {type = "error", title = "Error Message:", msg = "Error Message Text Here", config = {timeOut = 5000}})
|
||||
```
|
||||
|
||||
#### Message notifications, top left of screen by default in Messages app
|
||||

|
||||
|
||||
```lua
|
||||
--guihooks.trigger('Message', {msg, ttl, category, icon}) --requires Messages app
|
||||
guihooks.trigger('Message', {msg = "Message Text Here", ttl = 5.0, category = "arrow_upward", icon = "arrow_upward"})
|
||||
guihooks.trigger('Message', {msg = "Message Text Here", ttl = 5.0, category = "arrow_downward", icon = "arrow_downward"})
|
||||
guihooks.trigger('Message', {msg = "Message Text Here", ttl = 5.0, category = "flag", icon = "flag"})
|
||||
guihooks.trigger('Message', {msg = "Message Text Here", ttl = 5.0, category = "check", icon = "check"})
|
||||
guihooks.trigger('Message', {msg = "Message Text Here", ttl = 5.0, category = "check_circle", icon = "check_circle"})
|
||||
guihooks.trigger('Message', {msg = "Message Text Here", ttl = 5.0, category = "warning", icon = "warning"})
|
||||
guihooks.trigger('Message', {msg = "Message Text Here", ttl = 5.0, category = "error", icon = "error"})
|
||||
guihooks.trigger('Message', {msg = "Message Text Here", ttl = 5.0, category = "directions_car", icon = "directions_car"})
|
||||
guihooks.trigger('Message', {msg = "Message Text Here", ttl = 5.0, category = "star", icon = "star"})
|
||||
guihooks.trigger('Message', {msg = "Message Text Here", ttl = 5.0, category = "timeline", icon = "timeline"})
|
||||
guihooks.trigger('Message', {msg = "Message Text Here", ttl = 5.0, category = "save", icon = "save"})
|
||||
guihooks.trigger('Message', {msg = "Message Text Here", ttl = 5.0, category = "settings", icon = "settings"})
|
||||
```
|
||||
#### Center large or small display flash
|
||||

|
||||

|
||||
|
||||
```lua
|
||||
--guihooks.trigger('ScenarioFlashMessage', {{msg, ttl, sound, big}} ) -- requires RaceCountdown ui app
|
||||
guihooks.trigger('ScenarioFlashMessage', {{"Message", 5.0, 0, true}} )
|
||||
guihooks.trigger('ScenarioFlashMessage', {{"Message Text Here", 5.0, 0, false}} )
|
||||
|
||||
--countdown example, when all executed at once, the items are queued and will follow eachother after the previous ttl expires
|
||||
guihooks.trigger('ScenarioFlashMessage', {{"3", 1.0, "Engine.Audio.playOnce('AudioGui', 'event:UI_Countdown1')", true}})
|
||||
guihooks.trigger('ScenarioFlashMessage', {{"2", 1.0, "Engine.Audio.playOnce('AudioGui', 'event:UI_Countdown2')", true}})
|
||||
guihooks.trigger('ScenarioFlashMessage', {{"1", 1.0, "Engine.Audio.playOnce('AudioGui', 'event:UI_Countdown3')", true}})
|
||||
guihooks.trigger('ScenarioFlashMessage', {{"GO!", 3.0, "Engine.Audio.playOnce('AudioGui', 'event:UI_CountdownGo')", true}})
|
||||
|
||||
--another sound example
|
||||
guihooks.trigger('ScenarioFlashMessage', {{"Teleported!", 3.0, "Engine.Audio.playOnce('AudioGui', 'event:UI_Checkpoint')", false}})
|
||||
```
|
||||
|
||||
#### Center mid-size persistent display
|
||||

|
||||
```lua
|
||||
--guihooks.trigger('ScenarioRealtimeDisplay', {msg = msg} ) -- requires Race Realtime Display ui app
|
||||
guihooks.trigger('ScenarioRealtimeDisplay', {msg = "Message Text Here"} )
|
||||
--these messages persist, clear with a blank string
|
||||
--if you are running live data, this is a good one to update rapidly (think timers, distance calcs, et cetera)
|
||||
guihooks.trigger('ScenarioRealtimeDisplay', {msg = ""} )
|
||||
```
|
||||
|
||||
## IMGUI Code Snippets
|
||||
|
||||
## CEF UI Code Snippets
|
||||
@@ -20,11 +20,12 @@ hide:
|
||||
9. No advertising Non-BeamMP/BeamNG Content :material-information-outline:{ title="This includes non-BeamMP communities, social media channels or other external links. This applies to posting within the BeamMP community, as well as sending users unsolicited DM's for the purpose of personal advertising." }
|
||||
10. No Impersonating Staff :material-information-outline:{ title="This includes claiming to be a staff member of BeamMP, or claiming to have the abilities associated with being a staff member. This also includes the imitation of staff members." }
|
||||
11. No Exploitation :material-information-outline:{ title="This includes exploiting any bugs or oversights for personal gain or to negatively impact the experience of others." }
|
||||
12. Follow all given TOS :material-information-outline:{ title="This is important as restrictions such as the Discord age restriction (13+) must also be followed to use our Discord server." }
|
||||
13. Respect Everyone :material-information-outline:{ title="This should go unsaid, but you need to have respect for everyone around you and act accordingly." }
|
||||
14. Keep to the topic of the category or channel. :material-information-outline:{ title="This should go unsaid, but keep your content on the topic of the area that you are posting within. E.g. support should helping people or used when seeking support." }
|
||||
15. No excessive CAPS LOCK or Reactions/Emojis :material-information-outline:{ title="Users should refrain from using excessive caps or emojis/reactions as not to obscure the point at hand." }
|
||||
16. Check the [BeamMP FAQ](../../support/player-faq.md) & [BeamMP Community FAQ](https://forum.beammp.com/c/faq/35) before posting in support areas.
|
||||
12. Authkey sharing and using alt-accounts to increase the key count beyond the given free amount is strictly prohibited.
|
||||
13. Follow all given TOS :material-information-outline:{ title="This is important as restrictions such as the Discord age restriction (13+) must also be followed to use our Discord server." }
|
||||
14. Respect Everyone :material-information-outline:{ title="This should go unsaid, but you need to have respect for everyone around you and act accordingly." }
|
||||
15. Keep to the topic of the category or channel. :material-information-outline:{ title="This should go unsaid, but keep your content on the topic of the area that you are posting within. E.g. support should helping people or used when seeking support." }
|
||||
16. No excessive CAPS LOCK or Reactions/Emojis :material-information-outline:{ title="Users should refrain from using excessive caps or emojis/reactions as not to obscure the point at hand." }
|
||||
17. Check the [BeamMP FAQ](../../support/player-faq.md) & [BeamMP Community FAQ](https://forum.beammp.com/c/faq/35) before posting in support areas.
|
||||
|
||||
## Discord Rules
|
||||
|
||||
@@ -37,10 +38,11 @@ hide:
|
||||
7. No Badgering Others (`@'ing`) :material-information-outline:{ title="This includes asking others repeatedly for a response after being ignored or told no." }
|
||||
8. Keep bot commands in command specific channels.
|
||||
10. No Role-Playing :material-information-outline:{ title="This is in place to prevent issues arising due to missing context or to prevent users from circumventing certain rules." }
|
||||
11. Do not offer to remote into other users computers or send malicous files.
|
||||
12. Do not explain/send links on how to pirate, acquire illegal copies of software, hacking accounts (Beaming), or paid mods.
|
||||
13. Do not advertise non-BeamNG/BeamMP content. Sending Media of your own channel is only allowed in the dedicated [media channel](https://discord.com/channels/601558901657305098/705427325646274680).
|
||||
14. Follow the instructions of Staff members. If you think a staff member is abusing their power, direct message their lead or project management.
|
||||
11. Do not ask users to DM you for help. Keep all support-related topics in the designated support area on the BeamMP Discord Server.
|
||||
12. Do not offer to remote into another user's computer and refrain from sending ambiguous/potentially malicious and/or damaging files/extensions.
|
||||
13. Do not explain and/or send links on how to pirate, acquire illegal copies of software, hacking accounts (beaming), or paid mods.
|
||||
14. Do not advertise non-BeamNG/BeamMP content. Sending Media of your own channel is only allowed in the dedicated [media channel](https://discord.com/channels/601558901657305098/705427325646274680).
|
||||
15. Follow the instructions of Staff members. If you think a staff member is abusing their power, direct message their lead or project management.
|
||||
|
||||
## How to appeal actions against you:
|
||||
|
||||
|
||||
@@ -10,18 +10,21 @@ However, both Linux and MacOS are secondary platforms, this means bugs are to be
|
||||
BeamMP will not work with pirated or outdated versions of BeamNG.drive.
|
||||
The BeamMP support team does not offer support for issues with pirated / outdated copies.
|
||||
|
||||
---
|
||||
|
||||
## **2. Installation**
|
||||
|
||||
### **2a. Windows Installation**
|
||||
1. Go to [beammp.com](https://beammp.com/) and click the "Download client" button.
|
||||
2. Extract the `BeamMP_Installer.zip` archive.
|
||||
3. Launch `BeamMP_Installer.exe` and follow the instructions.
|
||||
4. The BeamMP Launcher icon should appear on your desktop. If not, just search for “BeamMP” in the windows search bar.
|
||||
5. Once the launcher has started, you should see a terminal window, shortly after BeamNG.drive should automatically start. **Do not** close the terminal window.
|
||||
6. After BeamNG launched, in the main menu, click the `Repository` button and make sure that `multiplayerbeammp` is **the only** enabled mod.
|
||||
7. Return to the main menu, click on 'More..' and the 'Multiplayer' button to start multiplayer.
|
||||
8. You will be prompted to login or play as a guest (not all servers will allow guests). You can create an account on our [forum](https://forum.beammp.com) and then login to BeamMP with the same credentials.
|
||||
9. Select any server you like, and press `Connect`. Enjoy!
|
||||
|
||||
!!!note
|
||||
|
||||
As of April 1st, 2026, the MSI installer is an "unrecognized app" according to Windows Defender SmartScreen.
|
||||
|
||||
To bypass this warning, click 'More info', then click 'Run anyway'.
|
||||
|
||||
1. Go to [beammp.com](https://beammp.com/) and click the 'Download Now' button.
|
||||
2. Run the `BeamMP_Installer.msi` installer and follow the instructions.
|
||||
3. The BeamMP Launcher icon should appear on your desktop. If not, just search for “BeamMP” in the Windows search bar.
|
||||
|
||||
!!!note
|
||||
|
||||
@@ -34,8 +37,8 @@ In order to do this, you need a basic understanding of how to build an applicati
|
||||
|
||||
Make sure you have basic development tools installed, often found in packages, for example:
|
||||
|
||||
- Debian: `sudo apt install build-essential`
|
||||
- Fedora: `sudo dnf install cmake gcc-c++ perl-IPC-Cmd perl-FindBin perl-File-Compare perl-File-Copy`
|
||||
- Debian/Ubuntu: `sudo apt install build-essential`
|
||||
- Fedora: `sudo dnf install cmake gcc gcc-c++ make perl perl-IPC-Cmd perl-FindBin perl-File-Compare perl-File-Copy kernel-headers kernel-devel`
|
||||
- Arch: `sudo pacman -S base-devel`
|
||||
- openSUSE: `zypper in -t pattern devel-basis`
|
||||
- SteamOS (Arch): `sudo pacman -S base-devel linux-api-headers glibc libconfig` (You also need to do `sudo steamos-readonly disable` but make sure to enable it again after installing the packages)
|
||||
@@ -64,7 +67,9 @@ Clone the BeamMP-Launcher Repository to your system using `git`, for example:
|
||||
`git clone https://github.com/BeamMP/BeamMP-Launcher.git`
|
||||
[Additional information about cloning a GitHub Repo](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository)
|
||||
|
||||
Checkout the tag that was used for the [latest release](https://github.com/BeamMP/BeamMP-Launcher/releases/latest). For example, if `v2.6.4` is used in the latest release, then do `git checkout v2.6.4`
|
||||
If you've used the example clone command we provided, you can use `cd BeamMP-Launcher` to go to the project's root directory.
|
||||
|
||||
Checkout the tag that was used for the [latest release](https://github.com/BeamMP/BeamMP-Launcher/releases/latest). For example, if `v2.8.0` is used in the latest release, then do `git checkout v2.8.0`
|
||||
|
||||
In the root directory of the project,
|
||||
|
||||
@@ -86,9 +91,26 @@ cmake --build bin --parallel
|
||||
|
||||
By not specifying `-DCMAKE_BUILD_TYPE=Release` you are building a debug version, which is larger in filesize but does not contain the launcher-can-only-connect-to-a-server-once bug
|
||||
|
||||
Move the finished application out of the `/bin` folder into its own folder and run it from there
|
||||
!!!note "Fedora Users"
|
||||
If vcpkg fails during OpenSSL compilation with kernel headers errors, ensure all dependencies are installed:
|
||||
```bash
|
||||
sudo dnf install kernel-headers kernel-devel gcc gcc-c++ make perl
|
||||
```
|
||||
Then clean the vcpkg cache:
|
||||
```bash
|
||||
rm -rf $VCPKG_ROOT/buildtrees/openssl
|
||||
```
|
||||
And retry the cmake configuration command.
|
||||
|
||||
The native linux BeamMP-Launcher will start and use native linux BeamNG.drive
|
||||
Move the finished application out of the `/bin` folder into its own folder and run it from there:
|
||||
```bash
|
||||
mkdir -p ~/beammp-launcher
|
||||
cp bin/BeamMP-Launcher ~/beammp-launcher/
|
||||
cd ~/beammp-launcher
|
||||
./BeamMP-Launcher
|
||||
```
|
||||
|
||||
The native Linux BeamMP-Launcher will start and use native Linux BeamNG.drive
|
||||
|
||||
### **2c. Using beamNG.drive with Proton**
|
||||
|
||||
@@ -116,9 +138,39 @@ Note that this assumes you put the launcher's binary you compiled earlier into `
|
||||
|
||||
This can be done for example by adding the [Linux-port of the Windows Segoe-UI emoji font](https://github.com/mrbvrz/segoe-ui-linux)
|
||||
|
||||
### **2d. Updating the Launcher**
|
||||
|
||||
If you already built the launcher and want to update it:
|
||||
|
||||
```bash
|
||||
export VCPKG_ROOT="$(pwd)/vcpkg"
|
||||
cd BeamMP-Launcher
|
||||
git fetch --tags
|
||||
```
|
||||
Checkout the tag that was used for the [latest release](https://github.com/BeamMP/BeamMP-Launcher/releases/latest). For example, if `v2.8.0` is used in the latest release, then do `git checkout v2.8.0`
|
||||
```
|
||||
cmake . -B bin -DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-linux
|
||||
cmake --build bin --parallel
|
||||
cp bin/BeamMP-Launcher ~/beammp-launcher/
|
||||
cd ~/beammp-launcher
|
||||
./BeamMP-Launcher
|
||||
```
|
||||
|
||||
|
||||
---
|
||||
|
||||
## **3. Known Issues**
|
||||
## **3. Using BeamMP**
|
||||
|
||||
1. Once you have started the launcher, you should see a terminal window. Shortly after, the standard BeamNG launcher should start. **Do not** close the terminal window.
|
||||
2. In the BeamNG.drive main menu, click the `Repository` button and check to make sure that `multiplayerbeammp` is **the only** enabled mod.
|
||||
3. Return to the main menu, click on 'More..' and the 'Multiplayer' button to start multiplayer.
|
||||
4. You will be prompted to login or play as a guest (not all servers will allow guests). You can create an account on our [forum](https://forum.beammp.com) and then login to BeamMP with the same credentials.
|
||||
5. Select any server you like, and press `Connect`. Enjoy!
|
||||
|
||||
---
|
||||
|
||||
## **4. Known Issues**
|
||||
|
||||
- The native linux BeamMP-Launcher currently can only connect to a server once, after disconnecting you need to restart the launcher. You can do that without closing the game inbetween
|
||||
- If you don’t see the “Multiplayer” button. Make sure that the BeamMP mod is present and activated in the “Mod Manager” then try pressing CTRL + L.
|
||||
- VPNs of any type may cause connection issues.
|
||||
|
||||
@@ -1171,14 +1171,419 @@ Triggered when a player sends a chat message. When cancelled, it will not show t
|
||||
Arguments: `player_id: number`, `vehicle_id: number`, `data: string`
|
||||
Cancellable: YES
|
||||
|
||||
Triggered when a player spawns a new vehicle. The `data` argument contains the car's configuration and positional/rotational data for the vehicle as a json string.
|
||||
Triggered when a player spawns a new vehicle. Note that vehicle swaps/replacements instead fire [`onVehicleEdited`](#onvehicleedited). The `data` argument contains the car's configuration and positional/rotational data for the vehicle as a json string.
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Example <code>data</code> value</summary>
|
||||
|
||||
The data string begins with a unique vehicle identifier, which is the player's ID, a hyphen, and then the vehicle ID. This is followed by a JSON object containing information about the vehicles configuration and positioning.
|
||||
|
||||
```
|
||||
0-0: {
|
||||
"abs": "realistic",
|
||||
"ign": 3,
|
||||
"jbm": "van",
|
||||
"pid": 0,
|
||||
"pos": [
|
||||
907.93902587891,
|
||||
773.50201416016,
|
||||
238.87800598145
|
||||
],
|
||||
"pro": "0",
|
||||
"rot": [
|
||||
0,
|
||||
0,
|
||||
0.99999994039536,
|
||||
0
|
||||
],
|
||||
"vcf": {
|
||||
"licenseName": "H30 9VV",
|
||||
"mainPartName": "van",
|
||||
"mainPartPath": "/van",
|
||||
"model": "van",
|
||||
"paints": [
|
||||
{
|
||||
"baseColor": [
|
||||
0.21999999880791,
|
||||
0.37000000476837003,
|
||||
0.33000001311302,
|
||||
1.2000000476837
|
||||
],
|
||||
"clearcoat": 0,
|
||||
"clearcoatRoughness": 0,
|
||||
"metallic": 0,
|
||||
"roughness": 0.070000000298023
|
||||
},
|
||||
{
|
||||
"baseColor": [
|
||||
0.62300002574921,
|
||||
0.62300002574921,
|
||||
0.62300002574921,
|
||||
1.2000000476837
|
||||
],
|
||||
"clearcoat": 0.80000001192093,
|
||||
"clearcoatRoughness": 0.070000000298023,
|
||||
"metallic": 0.80000001192093,
|
||||
"roughness": 0.64999997615814
|
||||
},
|
||||
{
|
||||
"baseColor": [
|
||||
0.21999999880791,
|
||||
0.37000000476837003,
|
||||
0.33000001311302,
|
||||
1.2000000476837
|
||||
],
|
||||
"clearcoat": 0,
|
||||
"clearcoatRoughness": 0,
|
||||
"metallic": 0,
|
||||
"roughness": 0.070000000298023
|
||||
}
|
||||
],
|
||||
"partConfigFilename": "vehicles/van/h15_xt_passenger.pc",
|
||||
"parts": {
|
||||
"brakepad_F": "brakepad_F_premium",
|
||||
"brakepad_R": "brakepad_R_premium",
|
||||
"gps": "",
|
||||
"licenseplate_design_2_1": "",
|
||||
"linelock": "",
|
||||
"load_seat_FR": "",
|
||||
"n2o_system": "",
|
||||
"paint_design": "van_skin_twotone",
|
||||
"pickup_engine_v8_ecu": "pickup_engine_v8_ecu",
|
||||
"pickup_engine_v8_internals": "pickup_engine_v8_internals",
|
||||
"pickup_enginemounts": "pickup_enginemounts",
|
||||
"pickup_oilpan_v8": "pickup_oilpan_v8",
|
||||
"pickup_reversewarn": "",
|
||||
"pickup_sparetire": "pickup_sparetire_5l",
|
||||
"pickup_towhitch": "",
|
||||
"skin_glass": "van_skin_glass_tint",
|
||||
"skin_interior": "van_skin_interior_black",
|
||||
"soundscape_horn": "soundscape_horn_115",
|
||||
"tire_F_16x7_alt": "tire_F_225_75_16_alt_standard",
|
||||
"tire_R_16x7_alt": "tire_R_225_75_16_alt_standard",
|
||||
"van_ABS": "van_ABS",
|
||||
"van_ESC": "",
|
||||
"van_ac": "van_ac",
|
||||
"van_body": "van_body_passenger",
|
||||
"van_brake_F": "van_brake_F",
|
||||
"van_brake_R": "van_brake_R_drum",
|
||||
"van_bumper_F": "van_bumper_F_altb",
|
||||
"van_bumper_F_lip": "",
|
||||
"van_bumper_R": "van_bumper_R_altb",
|
||||
"van_bumper_accessory_F": "",
|
||||
"van_bumpersignal_FL": "van_bumpersignal_FL",
|
||||
"van_bumpersignal_FR": "van_bumpersignal_FR",
|
||||
"van_coilover_IFS": "van_coilover_IFS",
|
||||
"van_converter": "van_converter",
|
||||
"van_differential_F": "",
|
||||
"van_differential_R": "van_differential_R",
|
||||
"van_door_FL": "van_door_FL",
|
||||
"van_door_FR": "van_door_FR",
|
||||
"van_doordetent_FL": "van_doordetent_FL",
|
||||
"van_doordetent_FR": "van_doordetent_FR",
|
||||
"van_doordetent_RL": "van_doordetent_RL",
|
||||
"van_doordetent_RR": "van_doordetent_RR",
|
||||
"van_doorglass_L": "van_doorglass_L",
|
||||
"van_doorglass_R": "van_doorglass_R",
|
||||
"van_doorpanel_FL": "van_doorpanel_FL",
|
||||
"van_doorpanel_FR": "van_doorpanel_FR",
|
||||
"van_driveshaft_R": "van_driveshaft_R",
|
||||
"van_engine": "van_engine_v8_4.5",
|
||||
"van_exhaust_v8": "van_exhaust_v8",
|
||||
"van_fascia_F": "van_fascia_F_high",
|
||||
"van_fender_L": "van_fender_L",
|
||||
"van_fender_R": "van_fender_R",
|
||||
"van_fenderflare_FL": "",
|
||||
"van_fenderflare_FR": "",
|
||||
"van_fenderflare_RL": "",
|
||||
"van_fenderflare_RR_sidedoor": "",
|
||||
"van_finaldrive_R": "van_finaldrive_R_355",
|
||||
"van_frame": "van_frame",
|
||||
"van_fueltank": "van_fueltank",
|
||||
"van_header": "van_exhmanifold",
|
||||
"van_headlight_L_high": "van_headlight_L_high",
|
||||
"van_headlight_R_high": "van_headlight_R_high",
|
||||
"van_hood": "van_hood",
|
||||
"van_hub_F": "van_hub_F_5",
|
||||
"van_hub_R": "van_hub_R_5",
|
||||
"van_intake_v8": "van_intake_v8",
|
||||
"van_intcarpet_roof": "van_intcarpet_roof",
|
||||
"van_interior": "van_interior",
|
||||
"van_lettering_doors_F": "van_lettering_doors_F_h15",
|
||||
"van_lettering_reardoor_L": "van_lettering_gavril_reardoor_L",
|
||||
"van_lettering_reardoor_R": "van_lettering_h15_xt_reardoor_R",
|
||||
"van_licenseplate_F": "van_licenseplate_F",
|
||||
"van_licenseplate_R": "van_licenseplate_R",
|
||||
"van_lightbar": "",
|
||||
"van_mirror_L": "van_mirror_L",
|
||||
"van_mirror_R": "van_mirror_R",
|
||||
"van_mod": "",
|
||||
"van_muffler": "van_muffler",
|
||||
"van_power_steering": "",
|
||||
"van_radiator": "van_radiator",
|
||||
"van_radio": "van_radio",
|
||||
"van_reardoor_L": "van_reardoor_L",
|
||||
"van_reardoor_R": "van_reardoor_R",
|
||||
"van_reardoorglass_L": "van_reardoorglass_L",
|
||||
"van_reardoorglass_R": "van_reardoorglass_R",
|
||||
"van_reardoorpanel_L": "van_reardoorpanel_L",
|
||||
"van_reardoorpanel_R": "van_reardoorpanel_R",
|
||||
"van_rollcage": "",
|
||||
"van_roof": "van_roof",
|
||||
"van_roof_accessory": "",
|
||||
"van_runningboard": "",
|
||||
"van_seat_1R": "van_seat_1R",
|
||||
"van_seat_2R": "van_seat_2R",
|
||||
"van_seat_3R": "van_seat_3R",
|
||||
"van_seat_FL": "van_seat_FL",
|
||||
"van_seat_FR": "van_seat_FR",
|
||||
"van_shifter": "van_shifter_A",
|
||||
"van_shock_R": "van_shock_R",
|
||||
"van_sidedoor_FR": "van_sidedoor_FR_alt",
|
||||
"van_sidedoor_RR": "van_sidedoor_RR_alt",
|
||||
"van_sidedoorglass_FR": "van_sidedoorglass_FR",
|
||||
"van_sidedoorglass_RR": "van_sidedoorglass_RR",
|
||||
"van_sidedoorpanel_FR": "van_sidedoorpanel_FR",
|
||||
"van_sidedoorpanel_RR": "van_sidedoorpanel_RR",
|
||||
"van_sideglass_FL": "van_sideglass_FL",
|
||||
"van_sideglass_ML": "van_sideglass_ML",
|
||||
"van_sideglass_RL": "van_sideglass_RL",
|
||||
"van_sideglass_RR": "van_sideglass_RR",
|
||||
"van_snorkel": "",
|
||||
"van_spring_R": "van_spring_R",
|
||||
"van_steer": "van_steer",
|
||||
"van_steering": "van_steering",
|
||||
"van_suspension_F": "van_IFS",
|
||||
"van_suspension_R": "van_axle_R",
|
||||
"van_swaybar_F": "van_swaybar_F",
|
||||
"van_swaybar_R": "",
|
||||
"van_taillight_L": "van_taillight_L",
|
||||
"van_taillight_R": "van_taillight_R",
|
||||
"van_taillightguard_L": "",
|
||||
"van_taillightguard_R": "",
|
||||
"van_transfer_case": "van_transfer_case_RWD",
|
||||
"van_transmission": "van_transmission_4A",
|
||||
"van_tubs": "van_tubs",
|
||||
"van_valance_F": "van_valance_F",
|
||||
"van_wheeldata_F": "van_wheeldata_F",
|
||||
"van_wheeldata_R": "van_wheeldata_R",
|
||||
"van_windshield": "van_windshield",
|
||||
"wheel_F_5": "wheel_25a_16x7_5_F",
|
||||
"wheel_R_5": "wheel_25a_16x7_5_R"
|
||||
},
|
||||
"vars": {}
|
||||
},
|
||||
"vid": 29339
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
##### `onVehicleEdited`
|
||||
|
||||
Arguments: `player_id: number`, `vehicle_id: number`, `data: string`
|
||||
Cancellable: YES
|
||||
|
||||
Triggered when a player edits their vehicle and applies the edit. The `data` argument contains the car's updated configuration as a json string but does **not** include positional or rotational data. You can use [MP.GetPositionRaw](#mpgetpositionrawpid-number-vid-number-tablestring) to get positional and rotational data.
|
||||
Triggered when a player edits or replaces their vehicle. The `data` argument contains the car's updated configuration as a json string but does **not** include positional or rotational data. You can use [MP.GetPositionRaw](#mpgetpositionrawpid-number-vid-number-tablestring) to get positional and rotational data.
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Example <code>data</code> value</summary>
|
||||
|
||||
The data string begins with a unique vehicle identifier, which is the player's ID, a hyphen, and then the vehicle ID. This is followed by a JSON object containing information about the vehicles configuration.
|
||||
|
||||
```
|
||||
0-0: {
|
||||
"abs": "realistic",
|
||||
"ign": 3,
|
||||
"jbm": "van",
|
||||
"pid": 0,
|
||||
"pro": "0",
|
||||
"vcf": {
|
||||
"licenseName": "P60 1EP",
|
||||
"mainPartName": "van",
|
||||
"mainPartPath": "/van",
|
||||
"model": "van",
|
||||
"paints": [
|
||||
{
|
||||
"baseColor": [
|
||||
0.40000000596046,
|
||||
0.050000000745058,
|
||||
0.050000000745058,
|
||||
1.2000000476837
|
||||
],
|
||||
"clearcoat": 0,
|
||||
"clearcoatRoughness": 0,
|
||||
"metallic": 0,
|
||||
"roughness": 0.070000000298023
|
||||
},
|
||||
{
|
||||
"baseColor": [
|
||||
0.40000000596046,
|
||||
0.050000000745058,
|
||||
0.050000000745058,
|
||||
1.2000000476837
|
||||
],
|
||||
"clearcoat": 0,
|
||||
"clearcoatRoughness": 0,
|
||||
"metallic": 0,
|
||||
"roughness": 0.070000000298023
|
||||
},
|
||||
{
|
||||
"baseColor": [
|
||||
0.40000000596046,
|
||||
0.050000000745058,
|
||||
0.050000000745058,
|
||||
1.2000000476837
|
||||
],
|
||||
"clearcoat": 0,
|
||||
"clearcoatRoughness": 0,
|
||||
"metallic": 0,
|
||||
"roughness": 0.070000000298023
|
||||
}
|
||||
],
|
||||
"partConfigFilename": "vehicles/van/h15_passenger.pc",
|
||||
"parts": {
|
||||
"brakepad_F": "brakepad_F_premium",
|
||||
"brakepad_R": "brakepad_R_premium",
|
||||
"gps": "",
|
||||
"hubcap_F_16": "hubcap_09c_F_altd",
|
||||
"hubcap_R_16": "hubcap_09c_R_altd",
|
||||
"licenseplate_design_2_1": "",
|
||||
"linelock": "",
|
||||
"load_seat_FR": "",
|
||||
"n2o_system": "",
|
||||
"paint_design": "",
|
||||
"pickup_engine_v8_ecu": "pickup_engine_v8_ecu_late",
|
||||
"pickup_engine_v8_internals": "pickup_engine_v8_internals",
|
||||
"pickup_enginemounts": "pickup_enginemounts",
|
||||
"pickup_oilpan_v8": "pickup_oilpan_v8",
|
||||
"pickup_reversewarn": "",
|
||||
"pickup_sparetire": "pickup_sparetire_6l",
|
||||
"pickup_towhitch": "",
|
||||
"skin_glass": "",
|
||||
"skin_interior": "van_skin_interior_ivory",
|
||||
"soundscape_horn": "soundscape_horn_115",
|
||||
"tire_F_16x7_alt": "tire_F_225_75_16_alt_standard",
|
||||
"tire_R_16x7_alt": "tire_R_225_75_16_alt_standard",
|
||||
"trimring_F_16x7": "",
|
||||
"trimring_R_16x7": "",
|
||||
"van_ABS": "van_ABS",
|
||||
"van_ac": "van_ac",
|
||||
"van_body": "van_body_passenger",
|
||||
"van_brake_F": "van_brake_F",
|
||||
"van_brake_R": "van_brake_R",
|
||||
"van_bumper_accessory_F_late": "",
|
||||
"van_bumper_F": "van_bumper_F_late_alt",
|
||||
"van_bumper_F_lip_late": "",
|
||||
"van_bumper_R": "van_bumper_R_late_alt",
|
||||
"van_coilover_IFS": "van_coilover_IFS",
|
||||
"van_converter": "van_converter",
|
||||
"van_differential_F": "",
|
||||
"van_differential_R": "van_differential_R",
|
||||
"van_door_FL": "van_door_FL",
|
||||
"van_door_FR": "van_door_FR",
|
||||
"van_doordetent_FL": "van_doordetent_FL",
|
||||
"van_doordetent_FR": "van_doordetent_FR",
|
||||
"van_doordetent_RL": "van_doordetent_RL",
|
||||
"van_doordetent_RR": "van_doordetent_RR",
|
||||
"van_doorglass_L": "van_doorglass_L",
|
||||
"van_doorglass_R": "van_doorglass_R",
|
||||
"van_doorpanel_FL": "van_doorpanel_FL",
|
||||
"van_doorpanel_FR": "van_doorpanel_FR",
|
||||
"van_driveshaft_R": "van_driveshaft_R",
|
||||
"van_engine": "van_engine_v8_4.5",
|
||||
"van_ESC": "van_ESC",
|
||||
"van_exhaust_v8": "van_exhaust_v8",
|
||||
"van_fascia_F": "van_fascia_F_late",
|
||||
"van_fender_L": "van_fender_L",
|
||||
"van_fender_R": "van_fender_R",
|
||||
"van_fenderflare_FL": "",
|
||||
"van_fenderflare_FR": "",
|
||||
"van_fenderflare_RL": "",
|
||||
"van_fenderflare_RR_sidedoor": "",
|
||||
"van_finaldrive_R": "van_finaldrive_R_355",
|
||||
"van_frame": "van_frame",
|
||||
"van_fueltank": "van_fueltank",
|
||||
"van_grille_F_late": "van_grille_F_late",
|
||||
"van_header": "van_exhmanifold",
|
||||
"van_headlight_L_late": "van_headlight_L_late",
|
||||
"van_headlight_R_late": "van_headlight_R_late",
|
||||
"van_hood": "van_hood_late",
|
||||
"van_hub_F": "van_hub_F_6",
|
||||
"van_hub_R": "van_hub_R_6",
|
||||
"van_intake_v8": "van_intake_v8_late",
|
||||
"van_intcarpet_roof": "van_intcarpet_roof",
|
||||
"van_interior": "van_interior",
|
||||
"van_lettering_doors_F": "van_lettering_doors_F_h15",
|
||||
"van_lettering_reardoor_L": "van_lettering_gavril_reardoor_L",
|
||||
"van_lettering_reardoor_R": "van_lettering_h15_reardoor_R",
|
||||
"van_licenseplate_F_late": "van_licenseplate_F_late",
|
||||
"van_licenseplate_R_late": "van_licenseplate_R_late",
|
||||
"van_lightbar": "",
|
||||
"van_mirror_L": "van_mirror_L",
|
||||
"van_mirror_R": "van_mirror_R",
|
||||
"van_mod": "",
|
||||
"van_muffler": "van_muffler",
|
||||
"van_power_steering": "",
|
||||
"van_radiator": "van_radiator",
|
||||
"van_radio": "van_radio",
|
||||
"van_reardoor_L": "van_reardoor_L",
|
||||
"van_reardoor_R": "van_reardoor_R",
|
||||
"van_reardoorglass_L": "van_reardoorglass_L",
|
||||
"van_reardoorglass_R": "van_reardoorglass_R",
|
||||
"van_reardoorpanel_L": "van_reardoorpanel_L",
|
||||
"van_reardoorpanel_R": "van_reardoorpanel_R",
|
||||
"van_rollcage": "",
|
||||
"van_roof": "van_roof",
|
||||
"van_roof_accessory": "",
|
||||
"van_runningboard": "",
|
||||
"van_seat_1R": "van_seat_1R",
|
||||
"van_seat_2R": "van_seat_2R",
|
||||
"van_seat_3R": "van_seat_3R",
|
||||
"van_seat_FL": "van_seat_FL",
|
||||
"van_seat_FR": "van_seat_FR",
|
||||
"van_shifter": "van_shifter_A",
|
||||
"van_shock_R": "van_shock_R",
|
||||
"van_sidedoor_FR": "van_sidedoor_FR_alt",
|
||||
"van_sidedoor_RR": "van_sidedoor_RR_alt",
|
||||
"van_sidedoorglass_FR": "van_sidedoorglass_FR",
|
||||
"van_sidedoorglass_RR": "van_sidedoorglass_RR",
|
||||
"van_sidedoorpanel_FR": "van_sidedoorpanel_FR",
|
||||
"van_sidedoorpanel_RR": "van_sidedoorpanel_RR",
|
||||
"van_sideglass_FL": "van_sideglass_FL",
|
||||
"van_sideglass_ML": "van_sideglass_ML",
|
||||
"van_sideglass_RL": "van_sideglass_RL",
|
||||
"van_sideglass_RR": "van_sideglass_RR",
|
||||
"van_snorkel": "",
|
||||
"van_spring_R": "van_spring_R",
|
||||
"van_steer": "van_steer_facelift",
|
||||
"van_steering": "van_steering",
|
||||
"van_suspension_F": "van_IFS",
|
||||
"van_suspension_R": "van_axle_R",
|
||||
"van_swaybar_F": "van_swaybar_F",
|
||||
"van_swaybar_R": "",
|
||||
"van_taillight_L": "van_taillight_L",
|
||||
"van_taillight_R": "van_taillight_R",
|
||||
"van_taillightguard_L": "",
|
||||
"van_taillightguard_R": "",
|
||||
"van_transfer_case": "van_transfer_case_RWD",
|
||||
"van_transmission": "van_transmission_4A",
|
||||
"van_tubs": "van_tubs",
|
||||
"van_valance_F": "van_valance_F_late",
|
||||
"van_wheeldata_F": "van_wheeldata_F",
|
||||
"van_wheeldata_R": "van_wheeldata_R",
|
||||
"van_windshield": "van_windshield",
|
||||
"wheel_F_6": "steelwheel_02b_16x7_F",
|
||||
"wheel_R_6": "steelwheel_02b_16x7_R"
|
||||
},
|
||||
"vars": {}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
##### `onVehicleDeleted`
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ The setup consists of the following steps, you should follow all of them.
|
||||
* [RackGenius](https://rackgeni.us/beammp-plans)
|
||||
* [Connect Hosting](https://connecthosting.net/beammp)
|
||||
* [Assetto Hosting](https://assettohosting.com/en/games/beamng)
|
||||
* [Zap Hosting](https://zap-hosting.com/en/beammp-server-hosting/)
|
||||
* [ZAP-Hosting](https://zap-hosting.com/itsbeammp)
|
||||
* [HostHavoc](https://hosthavoc.com/)
|
||||
* [PedalHost](https://pedal.host/)
|
||||
* [Vyper Hosting](https://vyperhosting.com/r/beammp)
|
||||
@@ -55,6 +55,8 @@ The setup consists of the following steps, you should follow all of them.
|
||||
* [Four Seasons Hosting](https://fourseasonshosting.com)
|
||||
* [Vertuo Hosting](https://vertuohosting.com)
|
||||
* [Winheberg](https://winheberg.fr/offres/gaming/beammp?lang=en)
|
||||
* [Wabbanode](https://wabbanode.com/partner/beammp)
|
||||
* [Iceline Hosting](https://iceline-hosting.com/games/beammp)
|
||||
|
||||
|
||||
#### 1.1 Firewall
|
||||
@@ -63,6 +65,7 @@ Depending on your setup, you may need to let BeamMP-Server through your firewall
|
||||
|
||||
There you want to allow the BeamMP-Server through the firewall, **both incoming and outgoing connections**, and **both TCP and UDP**. If your firewall asks for a port instead, that will have to be the same port you used in step “1\. Port Forwarding” (usually 30814).
|
||||
|
||||
For a more detailed guide, refer to [this documentation page](https://docs.beammp.com/FAQ/Defender-exclusions/).
|
||||
If you have issues, also feel free to ask on our [Forum](https://forum.beammp.com) or on our [Discord server](https://discord.gg/beammp) in the `#support` channel.
|
||||
|
||||
### **2. Obtaining an Authentication Key**
|
||||
@@ -79,7 +82,7 @@ You will need a [Discord](https://discord.com) account for this step. This is ne
|
||||
|
||||
#### 2.1. Accessing the keys page
|
||||
|
||||
Login with Discord to the [Keymaster](https://beammp.com/keymaster).
|
||||
Login with Discord to the [Keymaster](https://keymaster.beammp.com).
|
||||
From the Keymaster homepage click on "Keys" on the left of the screen:
|
||||
|
||||
<figure markdown>
|
||||
@@ -168,23 +171,31 @@ They are called “ServerConfig.toml”, “Server.log” and “BeamMP-Server.e
|
||||
|
||||
Open the `ServerConfig.toml` with a text editor such as `Notepad`. You can do this with [Right Click] → “Open With…” and then selecting a text editor.
|
||||
|
||||
You should see something like this:
|
||||
Here is an example configuration:
|
||||
|
||||
```TOML
|
||||
[General]
|
||||
AuthKey = ''
|
||||
Debug = false
|
||||
Description = 'BeamMP Default Description'
|
||||
Map = '/levels/gridmap_v2/info.json'
|
||||
MaxCars = 1
|
||||
MaxPlayers = 10
|
||||
Name = 'BeamMP Server'
|
||||
Port = 30814
|
||||
Private = false
|
||||
ResourceFolder = 'Resources'
|
||||
AuthKey = "auth-key"
|
||||
AllowGuests = false
|
||||
LogChat = false
|
||||
Debug = false
|
||||
IP = "::"
|
||||
Private = true
|
||||
InformationPacket = true
|
||||
Name = "Test Server"
|
||||
Tags = "Freeroam,Modded,Racing,Police"
|
||||
MaxCars = 2
|
||||
MaxPlayers = 10
|
||||
Map = "/levels/ks_nord/info.json"
|
||||
Description = "Total Random Beam MP Server"
|
||||
ResourceFolder = "Resources"
|
||||
```
|
||||
|
||||
This is your configuration file. It uses a format called TOML. Refer to the [Server Maintenance](server-maintenance.md) section for more info on this file.
|
||||
!!! info
|
||||
|
||||
This is your configuration file. It uses a format called TOML. Refer to the [Server Maintenance](server-maintenance.md) section for more info on this file and the variables.
|
||||
Your server will **NOT** show in the server list as long as `Private = true`. _If_ you want it to show in the list, set that to **`Private = false`**.
|
||||
|
||||
For now, we only care about the `AuthKey` field. Between the quotes `''`, you want to paste in your AuthKey you copied in the first step.
|
||||
|
||||
@@ -196,10 +207,6 @@ Give your server a name, too, in the `Name` field. You can format this with colo
|
||||
|
||||
If you picked a different **Port** other than **30814**, make sure to replace it here under `Port`.
|
||||
|
||||
!!! info
|
||||
|
||||
Your server will **NOT** show in the server list as long as `Private = true`. _If_ you want it to show in the list, set that to **`Private = false`**.
|
||||
|
||||
### **5. Validation**
|
||||
|
||||
Now run your server again, and see if it spits out any more `[ERROR]` or `[WARN]` messages. The server should stay open now. In the following steps (6.) below you can find out how to join the server.
|
||||
@@ -257,7 +264,7 @@ You have to give other users the public IP Address of your Server. However, be c
|
||||
|
||||
To join your public server they can simply go to the server list, type the name of the server, and click connect. If you are unsure of what your server name is, it will be the name you put in the `ServerConfig.toml`.
|
||||
Make sure search filters are disabled and the Map set to "Any" if you can't find it.
|
||||
You can also check the [Keymaster](https://beammp.com/keymaster) Website for the Servers IP Address.
|
||||
You can also check the [Keymaster](https://keymaster.beammp.com/) Website for the Servers IP Address.
|
||||
|
||||
Should you or your friends experience a "Connection Failed!" Error, check the Launcher Window for codes like 10060, 10061, 10030.
|
||||
This means you eihter have a CGNAT IPv4, or you have done something wrong during Step **1 Port Forwarding** or **1.1. Firewall**.
|
||||
|
||||
@@ -51,7 +51,7 @@ There are 4 major steps in this guide.
|
||||
Use a tool such as CheckBeamMP to test if the rule is working.
|
||||
|
||||
<form action="https://check.beammp.com/api/v2/beammp" method="get" target="_blank">
|
||||
<label for="ip">IP adress:</label>
|
||||
<label for="ip">IP address:</label>
|
||||
<input type="text" id="ip" name="ip"><br>
|
||||
<label for="port">Port:</label>
|
||||
<input type="text" id="port" name="port"><br>
|
||||
@@ -226,7 +226,7 @@ There are a few different ways to test the connection.
|
||||
Our recommend way is to use our tool **CheckBeamMP** as this tests for BeamMP specific issues and protocols.
|
||||
|
||||
<form action="https://check.beammp.com/api/v2/beammp" method="get" target="_blank">
|
||||
<label for="ip">IP adress:</label>
|
||||
<label for="ip">IP address:</label>
|
||||
<input type="text" id="ip" name="ip"><br>
|
||||
<label for="port">Port:</label>
|
||||
<input type="text" id="port" name="port"><br>
|
||||
|
||||
@@ -14,16 +14,26 @@ The server config, which is a file called `ServerConfig.toml`, uses the [TOML fo
|
||||
|
||||
The config has one section by default, called `[General]`, which holds the following values:
|
||||
|
||||
| Key | Value Type | Description |
|
||||
|-------------|----------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| AuthKey | AuthKey format `xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` where all x's are alphanumeric characters (numbers and letters) | Used to identify your server with the backend. You should have gotten one while following the installation instructions. |
|
||||
| Debug | true /false | When enabled (true), will show more messages in the log and provide more information. Enable this if you run into issues. Enabling this will drastically increase the size of the log file. |
|
||||
| Private | true/false | When enabled (true), your server will not be shown in the server list. Anyone with the correct IP and port can still connect. |
|
||||
| Description | Any "text" | Shown as the description of the server in the server list (if the server is public). You can use special characters to format this with colors and styles. |
|
||||
| Name | Any "text" | Shown as the name / title of your server in the server list. You can use special characters to format this with colors and styles. |
|
||||
| Map | A valid map location, such as `/levels/gridmap_v2/info.json` | The map your server will host. Has to be installed either by default (a list can be found below) or as a server mod. |
|
||||
| MaxCars | Any number ≥ 1 | The maximum number of cars per player. Any additional cars a player tries to spawn will be deleted instantly. |
|
||||
| Port | 1024-65535 | The networking port on which the server will be accessible. For a player to connect to your server directly, they will need your IP and this port. |
|
||||
| Key | Value Type | Description |
|
||||
|-------------------|----------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| Port | 1024-65535 | The networking port on which the server will be reachable. (Must be unique and not be used by another service on the same host). |
|
||||
| AuthKey | AuthKey format `xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` where all x's are alphanumeric characters (numbers and letters) | Used to identify a public set server with the backend. |
|
||||
| AllowGuests | true/false | Determines wether guests are allowed to join the server or not. |
|
||||
| LogChat | true/false | When enabled (true), chat messages are logged in the server.log file. |
|
||||
| Debug | true /false | When enabled (true), will show more messages in the log and provide more information. Enable this if you run into issues. Enabling this will drastically increase the size of the log file. |
|
||||
| IP | A local class address of one of the NICs connected to the host. (Default: "0.0.0.0" or "::" | The server will try to bind to the supplied IP. Please do not mess with the IP field unless you know what you are doing. This value does not need to be changed in order for the server to work. |
|
||||
| Private | true/false | When enabled (true), your server will not be shown in the server list. Anyone with the correct IP and port can still connect. |
|
||||
| InformationPacket | true/false | When enabled (true), the server is going to allow unauthenticated clients to get the same info as on the server listing but directly via the server. |
|
||||
| Name | Any "text" | Shown as the name / title of your server in the server list. You can use special characters to format this with colors and styles. |
|
||||
| Tags | See list of allowed tags further below. | Tags for search e.g. Police, Racing etc... |
|
||||
| MaxCars | Any number ≥ 1 | The maximum number of cars per player. Any additional cars a player tries to spawn will be deleted instantly. |
|
||||
| MaxPlayers | Any Number ≥ 1 | The maximum amount of players per server. This does not affect vehicle count. |
|
||||
| Map | A valid map location, such as `/levels/gridmap_v2/info.json` | The map your server will host. Has to be installed either by default (a list can be found below) or as a server mod. |
|
||||
| Description | Any "text" | Shown as the description of the server in the server list (if the server is public). You can use special characters to format this with colors and styles. |
|
||||
| ResourceFolder | A valid folder location, such as "D:\Server\BeamMP\Resources" | Useful to store the server and the resource folder seperately. |
|
||||
| ImScaredOfUpdates | true/false | This sets the Server to either auto update or not when a new version is released. |
|
||||
| UpdateReminderTime| Any number with s, min, h, d appended. (30s) | Sets the interval of the update reminder message printed in the terminal.
|
||||
|
||||
|
||||
Other sections can and should be used by server plugins (Lua API coming soon), like so: `[MyMod]`.
|
||||
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
## Pourquoi dois-je désactiver mes mods ?
|
||||
|
||||
Dans BeamMP, le serveur auquel vous vous connectez fournit les mods nécessaires. Ceux-ci sont téléchargés et activés automatiquement lors de la connexion. L'installation et l'activation de mods locaux peuvent souvent entraîner un dysfonctionnement de BeamMP, même avec un seul mod supplémentaire.
|
||||
|
||||
!!! warning
|
||||
|
||||
Supprimez tous les mods placés dans le dossier BeamNG.Drive\content\ ou ses sous-dossiers. Cet emplacement n'est PAS destiné à l'installation de mods et peut entraîner des problèmes, comme indiqué dans le fichier « DO_NOT_INSTALL_MODS_HERE.txt », situé dans le même répertoire.
|
||||
|
||||
!!! quote 'DO_NOT_INSTALL_MODS_HERE.txt"
|
||||
|
||||
NE copiez PAS les mods dans ce dossier : cela peut entraîner des mods cassés, une installation plus lente des mises à jour, un gestionnaire de mods cassé, un mode sans échec cassé et autres.
|
||||
|
||||
## Comment désactiver/supprimer mes mods ?
|
||||
|
||||
Il existe 3 options pour résoudre les problèmes possibles lors de l'utilisation de BeamMP.
|
||||
|
||||
### 1. Désactiver les mods
|
||||
|
||||
Avant de rejoindre un serveur, assurez-vous qu'aucun mod autre que « multiplayerbeammp » n'est activé. Si le jeu se bloque ou si vous rencontrez toujours des problèmes, reportez-vous à l'option suivante.
|
||||
|
||||
### 2. Création d'un nouveau dossier utilisateur
|
||||
|
||||
Ouvrez le dossier utilisateur BeamNG.Drive et renommez le dossier de la dernière version (par exemple 0.35) en 0.xx_OLD (0.35_OLD). Fermez BeamNG.drive avant de le renommer. 
|
||||
|
||||
### 3. Suppression des mods des dossiers de contenu.
|
||||
|
||||
Pour accéder au dossier Beamng.drive\content\ et le vider de tout mod, ouvrez l'emplacement d'installation de BeamNG.drive. Faites un clic droit sur le dossier `content` et supprimez-le. Procédez à la vérification des fichiers du jeu via Steam ou Epic Games. Les fichiers seront alors à nouveau téléchargés.
|
||||
|
||||
Une fois terminé, lancez BeamNG.Drive via le lanceur BeamMP. Le seul mod activé dans le dépôt devrait être « multiplayerbeammp », ainsi que le bouton d'accès à BeamMP dans le menu principal. Si vous rencontrez toujours des difficultés pour rejoindre un serveur moddé, il est probable que des mods défectueux ou obsolètes soient disponibles.
|
||||
|
||||
### 4. Nettoyage du cache de BeamMP-Launcher
|
||||
|
||||
Pour nettoyer les mods en cache des répertoires BeamMP, accédez à l'emplacement d'installation de votre lanceur BeamMP. Par défaut, le chemin est « C:\Users\AppData\BeamMP-Launcher ». Vous y trouverez un dossier « Resources ». Supprimez ce dossier pour supprimer tous les mods en cache. Cela peut être utile si vous avez besoin de plus d'espace disque ou si vous souhaitez supprimer des mods BeamNG obsolètes.
|
||||
|
||||
!!! question "Mes paramètres et configurations ont disparu ! Comment puis-je les restaurer ?"
|
||||
|
||||
Si vous avez renommé le dossier utilisateur, vous avez forcé le jeu à créer un nouveau dossier utilisateur propre. Vous pouvez copier les dossiers « paramètres » et « véhicules » du dossier renommé (par exemple, 0.34_OLD) vers le nouveau dossier créé.
|
||||
Assurez-vous que BeamNG.Drive est fermé et remplacez tous les éléments à l'emplacement où vous souhaitez copier les dossiers. Toutes les configurations et tous les paramètres devraient maintenant être identiques.
|
||||
@@ -0,0 +1,25 @@
|
||||
# Проблема
|
||||
|
||||
Лаунчер не подключается к игре. Это краткое руководство объясняет, как вручную изменить порт лаунчера.
|
||||
|
||||
# Изменение порта вручную
|
||||
|
||||
1. Запустить BeamNG
|
||||
2. В главном меню выберите «Параметры», затем «Мультиплеер»
|
||||
3. В параметрах многопользовательской игры включите `Show advanced options`
|
||||
4. Прокрутите страницу вниз
|
||||
5. В `Launcher port` измените номер порта на другой, например, 4567
|
||||
6. Закрыть BeamNG
|
||||
7. Щелкните правой кнопкой мыши по ярлыку BeamMP-launcher и выберите в контекстном меню `Open file location`
|
||||
8. Откройте файл `launcher.cfg` в текстовом редакторе.
|
||||
9. Измените `"Port": 4444,` номер на тот же, который вы использовали ранее в игровых настройках, в этом примере 4567
|
||||
10. Сохраните изменения и закройте текстовый редактор.
|
||||
11. Запустите BeamMP-лаунчер
|
||||
|
||||
Если соединения все еще нет, попробуйте еще раз с другим портом. Любое число между ~2000 и 65535 является допустимым портом
|
||||
|
||||
## Проблема все еще не решена?
|
||||
|
||||
Создайте заявку в службу поддержки на нашем [Discord Сервере](https://discord.gg/BeamMP).
|
||||
|
||||
Теги: Лаунчер, Ошибка Соединения, Номер Порта
|
||||
@@ -0,0 +1,52 @@
|
||||
# Как создать исключения в брандмауэре и антивирусе Защитника Windows?
|
||||
|
||||
!!! информация
|
||||
|
||||
```
|
||||
Перед изменением настроек брандмауэра убедитесь, что ваша сеть в параметрах Windows настроена как частная (при условии, что вы действительно находитесь в частной сети).
|
||||
|
||||
!!! danger ":material-scale-balance: DISCLAIMER:"
|
||||
|
||||
**Исключения в Firewall / Defender представляют собой риск**.
|
||||
|
||||
Создавая исключения, вы осознаёте риски, связанные с разрешением программам на вашем ПК и открытием портов вашей домашней сети для публичного доступа, и, следовательно, лишаете себя права привлекать BeamMP к ответственности за **любые** возможные убытки или ущерб, которые могут возникнуть у вас или вашего домохозяйства.
|
||||
|
||||
Мы не несём ответственности за любой контент, размещённый на внешних сервисах или сайтах, на которые ведут ссылки.
|
||||
```
|
||||
|
||||
## 1. Исключение для BeamMP-Launcher в брандмауэре Защитника.
|
||||
|
||||
1. Откройте `Windows Defender Firewall with advanced setting`.
|
||||
2. В окне нажмите `Inbound`, чтобы открыть вкладку исключений для входящих подключений.
|
||||
3. Нажмите `Create new rule` в правом верхнем углу, чтобы создать новое исключение.
|
||||
4. Выберите `Program`, чтобы создать исключение для конкретной программы.
|
||||
5. Введите полный путь к файлу `BeamMP-Launcher.exe`. По умолчанию это `%appdata%\BeamMP-Launcher\BeamMP-Launcher.exe` (без кавычек).
|
||||
6. Обязательно разрешите подключение
|
||||
7. Дайте исключению имя (например, «BeamMP-Launcher») и сохраните его.
|
||||
8. Перезагрузите компьютер.
|
||||
|
||||
## 1.1 Исключение сервера BeamMP из списка блокировки брандмауэра Защитника.
|
||||
|
||||
1. Откройте `Windows Defender Firewall with advanced setting`.
|
||||
2. В окне нажмите `Inbound`, чтобы открыть вкладку «Исключения для входящих».
|
||||
3. Нажмите `Create new rule` в правом верхнем углу, чтобы создать новое исключение.
|
||||
4. Выберите`Port` чтобы создать исключение для конкретной программы.
|
||||
5. Укажите тот же порт, что и в ServerConfig.toml.
|
||||
6. Введите полный путь к файлу `BeamMP-Server.exe`. Файл находится в той папке, в которую вы его поместили после загрузки.
|
||||
7. Убедитесь, что вы разрешили подключения
|
||||
8. Дайте имя исключению (прим. "BeamMP-Server") и сохраните его.
|
||||
9. Перезагрузите компьютер.
|
||||
|
||||
## 2. Исключение BeamMP-Launcher/Server из списка мониторинга Антивируса Защитника.
|
||||
|
||||
1. Откройте приложение `Windows Security`.
|
||||
2. Нажмите на первый пункт `virus and threat protection`.
|
||||
3. Нажмите `Manage settings` в разделе «Параметры защиты от вирусов и угроз».
|
||||
4. Прокрутите страницу вниз, чтобы перейти на вкладку `Exclusions`.
|
||||
5. Там нажмите «Добавить исключение» и выберите `process`.
|
||||
6. Введите `BeamMP-Launcher.exe` или `BeamMP-Server.exe` в поле и сохраните.
|
||||
7. Перезагрузите компьютер.
|
||||
|
||||
## Все еще сталкиваетесь с проблемами?
|
||||
|
||||
Откройте тему на [форуме](https://forum.beammp.com) или на нашем [сервере Discord](https://discord.gg/beammp) в канале `#support`.
|
||||
@@ -0,0 +1,46 @@
|
||||
Как проверить наличие CGNAT?
|
||||
|
||||
## Проблема
|
||||
|
||||
Все исключения брандмауэра и правила переадресации портов настроены правильно, но никто не может подключиться к вашему домашнему серверу?
|
||||
|
||||
Если у вас проблемы с подключением и вы используете Hosting-Service, обратитесь к ним за помощью. Если вы хотите использовать VPS или не можете разместить сервер дома, взгляните на наш [список партнерских хостинговых услуг](../../server/create-a-server/#partnered-hosting-services-paid) (Документация по настройке сервера).
|
||||
|
||||
# Что такое CGNAT?
|
||||
|
||||
Подробное объяснение того, что такое CGNAT и почему это может стать проблемой при попытке размещения сервера дома, можно найти на [этой странице](https://en.wikipedia.org/wiki/Carrier-grade_NAT).
|
||||
|
||||
# Как проверить наличие CGNAT?
|
||||
|
||||
## Метод 1:
|
||||
|
||||
Откройте командную строку, запустите `tracert -4 beammp.com`. Это выведет серию сетевых переходов. Дождитесь завершения операции (может занять до 30 переходов). Проверьте первые несколько IP-адресов после IP вашего маршрутизатора/модема/шлюза. Если после первого перехода появляется несколько IP-адресов в диапазоне `100.64.xx` - `100.127.xx` или `10.xx.xx.xx`, скорее всего, вы находитесь за CGNAT.
|
||||
|
||||
!!!примечание
|
||||
|
||||
```
|
||||
Первый переход будет вашим роутером/модемом/шлюзом и отличается в зависимости от устройства.
|
||||
Официальные диапазоны для локальных сетей следующие:
|
||||
``10.0.0.xxx`` - ``192.168.xxx.xxx`` - ```172.16.xxx.xxx``
|
||||
```
|
||||
|
||||
## Метод 2:
|
||||
|
||||
Узнайте WAN IP на вашем маршрутизаторе, посмотрев его на его интерфейсе. Сравните его с IP, опубликованным, например, на https://whatsmyip.org. Если они НЕ совпадают, вы находитесь за CGNAT.
|
||||
|
||||
## Метод 3/Решение:
|
||||
|
||||
Обратитесь за помощью к своему интернет-провайдеру. В зависимости от вашего интернет-провайдера, они могут не предлагать выделенные *динамические* IP-адреса. Помните, что статический IP-адрес не является обязательным.
|
||||
|
||||
!!! предупреждение
|
||||
|
||||
```
|
||||
Интернет-провайдеры могут предлагать выделенные IP-адреса только как платную услугу.
|
||||
Проверьте цены у наших партнёрских хостинговых сервисов — это может оказаться дешевле этой платы!
|
||||
```
|
||||
|
||||
Пример сети, не являющейся CGNAT:
|
||||
|
||||

|
||||
|
||||
Теги: Сервер, 10060 10061, CGNAT, Сбой подключения, Переадресация портов, Брандмауэр
|
||||
@@ -0,0 +1,42 @@
|
||||
## Зачем мне деактивировать моды?
|
||||
|
||||
В BeamMP сервер, к которому вы решили подключиться, предоставляет необходимые моды. Они загружаются и активируются автоматически при подключении. Наличие установленных и активных локальных модов часто приводит к тому, что BeamMP не работает должным образом, даже если у вас есть всего один дополнительный мод помимо BeamMP.
|
||||
|
||||
!!! предупреждение
|
||||
|
||||
```
|
||||
Удалите все моды, которые вы разместили в папке BeamNG.Drive\content\ или её подпапках. Это место не предназначено для установки модов и может вызвать проблемы, как указано в файле `DO_NOT_INSTALL_MODS_HERE.txt`, находящемся в той же директории.
|
||||
|
||||
!!! quote "DO_NOT_INSTALL_MODS_HERE.txt"
|
||||
|
||||
Ни в коем случае не копируйте моды в эту папку: это может привести к повреждению модов, замедлению установки обновлений, неправильной работе менеджера модов, нарушению работы безопасного режима и другим проблемам.
|
||||
```
|
||||
|
||||
## Как деактивировать/удалить мои моды?
|
||||
|
||||
Существует 3 варианта решения возможных проблем при использовании BeamMP.
|
||||
|
||||
### 1. Отключить моды
|
||||
|
||||
Перед тем, как присоединиться к любому серверу, убедитесь, что у вас нет модов, кроме 'multiplayerbeammp'. Если игра зависает или у вас все еще есть проблемы, обратитесь к следующему варианту
|
||||
|
||||
### 2. Создание новой папки пользователя
|
||||
|
||||
Откройте папку пользователя BeamNG.Drive и переименуйте папку `current`, например, в `current_old`. Перед переименованием закройте BeamNG.drive. 
|
||||
|
||||
### 3. Удаление модов из папок контента.
|
||||
|
||||
Чтобы получить доступ к папке `Beamng.drive\contentЧтобы получить доступ к папке и очистить ее от любых модов, откройте место установки BeamNG.drive. Щелкните правой кнопкой мыши папку `content` и удалите ее. Продолжайте проверять файлы игры через Steam или Epic Games. Это приведет к повторной загрузке файлов.
|
||||
|
||||
После того, как вы закончите, запустите BeamNG.Drive через BeamMP-Launcher, и у вас должен быть 'multiplayerbeammp' как ваш единственный включенный мод, доступный в репозитории, а также кнопка в главном меню для входа в BeamMP. Если у вас все еще есть проблемы с присоединением к модифицированному серверу, они, вероятно, предоставляют сломанные/устаревшие моды.
|
||||
|
||||
### 4. Очистка кэша BeamMP-Launcher
|
||||
|
||||
Чтобы очистить кэшированные моды из каталогов BeamMP, перейдите в место установки вашего BeamMP-Launcher. По умолчанию путь будет <code>C:\Users\AppData\BeamMP-Launcher</code>. Там вы найдете папку 'Resources'. Удалите папку, чтобы удалить все кэшированные моды. Это может быть полезно, если вам нужно больше места на диске или вы хотите очистить устаревшие моды BeamNG.
|
||||
|
||||
!!! вопрос "Мои настройки и конфигурации пропали! Как их восстановить?"
|
||||
|
||||
```
|
||||
Если вы переименовали папку пользователя, вы заставили игру создать новую, чистую папку пользователя. Вы можете скопировать папки "settings" и "vehicles" из папки, которую вы переименовали (например, `current_old`), в новую созданную папку.
|
||||
Убедитесь, что BeamNG.Drive закрыт, и замените все элементы в месте, куда вы копируете папки. Теперь у вас должны быть все настройки и конфигурации, как и раньше.
|
||||
```
|
||||
@@ -0,0 +1,20 @@
|
||||
# Проблема
|
||||
|
||||
Launcher не может обновиться или показывает пустой экран? Это краткое руководство объясняет, как вручную обновить Launcher.
|
||||
|
||||
!!! примечание
|
||||
|
||||
```
|
||||
Ты должен был уже установить или использовать BeamMP с помощью установщика, предоставленного на [нашем сайте](https://beammp.com), прежде чем продолжить.
|
||||
```
|
||||
|
||||
# Загрузка и установка нового лаунчера
|
||||
|
||||
1. Загрузите последнюю версию Launcher напрямую с [GitHub](https://github.com/BeamMP/BeamMP-Launcher/releases/latest/download/BeamMP-Launcher.exe).
|
||||
2. Перейдите в каталог BeamMP-Launcher.exe. По умолчанию эта папка находится в `C:\Users\<username>\AppData\Roaming\`. Заменить<username> с именем пользователя вашего Windows. Если вы установили BeamMP в другом месте, например <code>D:\BeamMP-Launcher</code>, то поместите Launcher в соответствующую папку BeamMP-Launcher.</username>
|
||||
3. Если применимо, замените существующий Launcher новым в папке BeamMP-Launcher.
|
||||
4. Запустите BeamMP-Launcher как обычно, чтобы проверить его работу.
|
||||
|
||||
## Проблема все еще не решена?
|
||||
|
||||
Создайте тикет поддержки на нашем [Сервере Discord](https://discord.gg/BeamMP). Теги: Launcher, скачать
|
||||
@@ -0,0 +1,64 @@
|
||||
# Часто задаваемые вопросы
|
||||
|
||||
Список часто задаваемых вопросов.
|
||||
|
||||
---
|
||||
|
||||
## **Клиент**
|
||||
|
||||
---
|
||||
|
||||
### **Как установить BeamMP?**
|
||||
|
||||
Полное руководство по установке BeamMP на Windows можно найти [здесь](https://docs.beammp.com/game/getting-started/).
|
||||
|
||||
---
|
||||
|
||||
### **Работает ли BeamMP на взломанной версии BeamNG?**
|
||||
|
||||
BeamMP не будет работать с пиратскими или устаревшими версиями BeamNG.drive. Команда поддержки BeamMP не предлагает поддержку по проблемам с пиратскими / устаревшими копиями.
|
||||
|
||||
---
|
||||
|
||||
### **Работает ли BeamMP на Linux?**
|
||||
|
||||
Клиент официально не поддерживается в Linux. Однако вы можете следовать нашему [руководству по использованию BeamMP в Linux](../game/getting-started/#2b-linux-installation)
|
||||
|
||||
---
|
||||
|
||||
### **Почему мой антивирус или Защитник Windows помечает лаунчер?**
|
||||
|
||||
Некоторые антивирусные программы могут помечать BeamMP как угрозу из-за его взаимодействия с сетью и другими вещами. В коде **нет вирусов**. Код для лаунчера, сервера и клиента lua можно найти на нашем [GitHub](https://github.com/BeamMP).
|
||||
|
||||
---
|
||||
|
||||
### **У меня плохая производительность игрового процесса. Что мне делать?**
|
||||
|
||||
Мы прилагаем все усилия, чтобы сделать многопользовательский режим максимально стабильным. Если вы уже снизили графические настройки, а производительность все еще низкая, рассмотрите возможность игры на сервере с меньшим количеством игроков. Игра в основном зависит от CPU, когда вы играете с большим количеством людей, поэтому старые CPU (даже четырехъядерные) будут страдать, если людей больше, чем горстка. (Общее практическое правило: 1 машина на поток CPU)
|
||||
|
||||
---
|
||||
|
||||
## **Разнообразный**
|
||||
|
||||
---
|
||||
|
||||
### **Где я могу найти код?**
|
||||
|
||||
Весь исходный код можно найти на нашем [GitHub](https://github.com/BeamMP). Перед внесением любых изменений помните, что код подчиняется нашим [Условиям использования](https://forum.beammp.com/t/terms-of-use-v1-0/43) и лицензиям:
|
||||
|
||||
Код | Лицензия
|
||||
--- | :-:
|
||||
Сервер | [ЛИЦЕНЗИЯ](https://github.com/BeamMP/BeamMP-Server/blob/master/LICENSE)
|
||||
Пусковая установка | [ЛИЦЕНЗИЯ](https://github.com/BeamMP/BeamMP-Launcher/blob/master/LICENSE)
|
||||
Клиент Луа | [ЛИЦЕНЗИЯ](https://github.com/BeamMP/BeamMP/blob/development/LICENSE)
|
||||
|
||||
---
|
||||
|
||||
### **Я нашел ошибку или эксплойт, что мне делать?**
|
||||
|
||||
Если проблема связана с кодом, и вы знаете, как использовать Github, откройте новую «Проблему» в соответствующем репозитории на нашем [GitHub](https://github.com/BeamMP). Мы используем рабочий процесс, основанный на проблемах, поэтому даже если у вас уже есть исправление ошибки, рассмотрите возможность открытия новой «Проблемы», а затем откройте «Запрос на извлечение» с решениями для проблемы. Более подробную информацию о содействии можно найти [здесь](https://github.com/BeamMP/BeamMP/blob/development/CONTRIBUTING.md).
|
||||
|
||||
Если у вас нет учетной записи GitHub, вы не знаете, как пользоваться GitHub, или у вас есть другие вопросы, вы можете связаться с нами следующими способами:
|
||||
|
||||
- Если это не что-то деликатное, вы можете создать сообщение на нашем [форуме BeamMP](https://forum.beammp.com) или сообщить об этом на нашем [официальном Discord](https://discord.gg/beammp).
|
||||
- Если информация конфиденциальная, вы можете напрямую сообщить о проблеме нашему сотруднику в [Discord](https://discord.gg/beammp).
|
||||
@@ -0,0 +1,25 @@
|
||||
# 28 марта 2026 г. FAQ о сбоях BeamMP
|
||||
|
||||
Временный раздел часто задаваемых вопросов (FAQ) в связи с (текущим) сбоем в работе BeamMP, начавшимся 28 марта 2026 года.
|
||||
|
||||
**Последнее обновление: 1 апреля 2026 г.**
|
||||
|
||||
=== Помогите! Мой лаунчер BeamMP не работает! Попробуйте переустановить лаунчер BeamMP. Для этого выполните следующие действия: 1. Перейдите на [сайт beammp.com](https://beammp.com/) 2. Нажмите *«Скачать сейчас»* 3. Запустите установщик и следуйте инструкциям
|
||||
|
||||
```
|
||||
!!! примечание
|
||||
|
||||
По состоянию на 1 апреля 2026 года, согласно Windows Defender SmartScreen, установщик MSI является «неопознанным приложением».
|
||||
|
||||
Чтобы обойти это предупреждение, нажмите *Подробнее*, а затем *Запустить в любом случае*.
|
||||
```
|
||||
|
||||
=== Помогите! Мои ключи авторизации больше не работают! С 1 апреля 2026 года системы управления ключами и авторизации отключены. Это означает, что ваши ключи авторизации работать не будут. Чтобы обойти это, выполните следующие действия: 1. Откройте файл `ServerConfig.toml` или любой другой файл конфигурации вашего сервера. 2. Установите значение `Private` в `true` . Должно получиться примерно так: `Private = true` 3. Это должно решить проблему с ключами авторизации.
|
||||
|
||||
```
|
||||
!!! примечание
|
||||
|
||||
С 1 апреля 2026 года системы аутентификации BeamMP отключены. Доступны только гостевые учетные записи.
|
||||
|
||||
Убедитесь, что ваш официант разрешает вход гостям.
|
||||
```
|
||||
@@ -0,0 +1,22 @@
|
||||
# Часто Задаваемые Вопросы Игроков
|
||||
|
||||
## Как привязать свой аккаунт Discord?
|
||||
|
||||
Связывание вашего аккаунта Discord с аккаунтом BeamMP — новая функция BeamMP. Для этого перейдите в [Настройки аккаунта на форуме](https://forum.beammp.com/my/preferences/account) и подключите свой аккаунт Discord в разделе «Связанные аккаунты» (это видно только при отключенной двухфакторной аутентификации на форуме).
|
||||
|
||||
## Как получить ранний доступ?
|
||||
|
||||
Ранний доступ (включая фиолетовую метку и другие преимущества) можно получить, поддержав нас финансово на [Patreon](https://patreon.com/BeamMP), купив уровень, сделав пожертвование или ускорив сервер Discord. Пожертвование **x** суммы в долларах США = **x** дополнительных ключей сервера, включая преимущества EA. Ускорение дает вам +4 ключа сервера в дополнение к преимуществам EA.
|
||||
|
||||
## Я подписался на Patreon. Как мне получить свои привилегии?
|
||||
|
||||
Чтобы автоматически получать бонусы, обязательно выполните следующие действия:
|
||||
|
||||
1. Свяжите свой аккаунт Discord на [Patreon](https://www.patreon.com/settings/apps/discord), чтобы получить роли и доступ на сервере Discord.
|
||||
2. Пожалуйста, убедитесь, что вы используете тот же адрес электронной почты на Patreon, что и для вашей учетной записи BeamMP на [Форуме](https://forum.beammp.com/).
|
||||
|
||||
Пожалуйста, будьте терпеливы, синхронизация системы может занять несколько часов, иногда до 12. Если вы не получили свои бонусы в течение 12 часов и выполнили вышеуказанные шаги, обратитесь в службу поддержки BeamMP.
|
||||
|
||||
## У меня есть еще вопросы!
|
||||
|
||||
Если ваш вопрос или проблема связаны с Игрой или процессом, пожалуйста, обратитесь к разделу [FAQ по Играм](game-faq.md). Если ваш вопрос или проблема связаны с запуском Сервера, пожалуйста, обратитесь к разделу [FAQ по Серверу](server-faq.md). В противном случае, пожалуйста, посетите [форумы](https://forum.beammp.com/c/faq/35), где сообщество может задавать вопросы и получать ответы.
|
||||
@@ -0,0 +1,89 @@
|
||||
# Часто задаваемые вопросы и известные проблемы
|
||||
|
||||
Список часто задаваемых вопросов и известных ошибок.
|
||||
|
||||
---
|
||||
|
||||
## **Сервер**
|
||||
|
||||
---
|
||||
|
||||
### **Как мне настроить свои собственные серверы?**
|
||||
|
||||
Всю информацию о настройке собственного сервера можно найти [здесь](https://docs.beammp.com/server/create-a-server/).
|
||||
|
||||
---
|
||||
|
||||
### **Можно ли создать сервер с использованием Linux?**
|
||||
|
||||
Мы предоставляем бинарные файлы для многих дистрибутивов Linux [здесь](https://github.com/BeamMP/BeamMP-Server/releases/latest). Если для вашей операционной системы/дистрибутива нет бинарных файлов, вы можете собрать их самостоятельно, загрузив исходный код на нашем [GitHub](https://github.com/BeamMP/BeamMP-Server), руководство можно найти [здесь](https://github.com/BeamMP/BeamMP-Server#build-instructions).
|
||||
|
||||
---
|
||||
|
||||
### **Каковы минимальные системные требования для запуска сервера BeamMP?**
|
||||
|
||||
- ОЗУ: 50+ МБ полезной памяти (не считая накладных расходов ОС)
|
||||
- Процессор: >1 ГГц, желательно многоядерный
|
||||
- ОС: Windows, Linux (теоретически любая POSIX)
|
||||
- Графический процессор: Нет
|
||||
- HDD: 10 МБ + Моды/Плагины
|
||||
- Пропускная способность: загрузка 5-10 Мбит/с
|
||||
|
||||
---
|
||||
|
||||
## **Игроки за пределами моей сети не могут присоединиться к моему серверу, размещенному на моем собственном сервере.**
|
||||
|
||||
Прочитайте руководство по переадресации портов, которое доступно [здесь](https://docs.beammp.com/server/port-forwarding/). Ниже приведен краткий обзор наиболее важных шагов. Если другие игроки, пытаясь подключиться к вашему серверу, получают код ошибки 10060, 10061 или 10038 в своем лаунчере BeamMP, то вам следует проверить следующие шаги:
|
||||
|
||||
- Перенаправьте порт 30814 (или любой другой порт, указанный в ServerConfig.toml), протоколы TCP и UDP.
|
||||
- Разрешить BeamMP через брандмауэр Windows, разрешить как входящие, так и исходящие соединения. Отключение брандмауэра обычно НЕ работает.
|
||||
- Убедитесь, что вы не используете VPN (это может вызвать проблемы).
|
||||
- Убедитесь, что сервер действительно работает, без ошибок и предупреждений.
|
||||
|
||||
Вы можете проверить, успешно ли выполнен проброс портов, с помощью CheckBeamMP, пока сервер работает.
|
||||
|
||||
<form action="https://check.beammp.com/api/v2/beammp" method="get" target="_blank">
|
||||
<label for="ip">IP-адрес:</label>
|
||||
<input type="text" id="ip" name="ip"><br>
|
||||
<label for="port">Порт:</label>
|
||||
<input type="text" id="port" name="port"><br>
|
||||
<input type="submit" value="CheckBeamMP">
|
||||
</form>
|
||||
|
||||
Примечания:
|
||||
|
||||
- Некоторые интернет-провайдеры не предоставляют выделенные адреса IPv4 для вашего соединения (CGNAT), поэтому переадресация портов может быть невозможна, несмотря на то, что она доступна в маршрутизаторе.
|
||||
- Переадресация портов невозможна, если вы используете мобильное (4G/5G) интернет-подключение.
|
||||
|
||||
---
|
||||
|
||||
### **Я вижу свой сервер, размещенный на собственном сервере, в списке серверов, но не могу подключиться к нему сам**
|
||||
|
||||
Если сервер запущен на той же машине, что и игра, вам самим придется использовать Direct Connect для присоединения с IP 127.0.0.1 и портом вашего сервера. Чтобы вы могли присоединиться на свой собственный сервер через список серверов, ваш маршрутизатор должен поддерживать NAT-loopback, но эту функцию поддерживают не многие домашние маршрутизаторы.
|
||||
|
||||
---
|
||||
|
||||
## **Разнообразный**
|
||||
|
||||
---
|
||||
|
||||
### **Где я могу найти код?**
|
||||
|
||||
Весь исходный код можно найти на нашем [GitHub](https://github.com/BeamMP). Прежде чем что-либо делать, помните, что код подчиняется нашим [Условиям использования](https://forum.beammp.com/t/terms-of-use-v1-0/43) и лицензиям:
|
||||
|
||||
Код | Лицензия
|
||||
--- | :-:
|
||||
Сервер | [ЛИЦЕНЗИЯ](https://github.com/BeamMP/BeamMP-Server/blob/master/LICENSE)
|
||||
Пусковая установка | [ЛИЦЕНЗИЯ](https://github.com/BeamMP/BeamMP-Launcher/blob/master/README.md)
|
||||
Клиент Луа | [ЛИЦЕНЗИЯ](https://github.com/BeamMP/BeamMP/blob/development/LICENSE.md)
|
||||
|
||||
---
|
||||
|
||||
### **Я нашел ошибку или эксплойт, что мне делать?**
|
||||
|
||||
Если проблема связана с кодом, и вы знаете, как использовать GitHub, создайте новую «Проблему» в соответствующем репозитории на нашем [GitHub](https://github.com/BeamMP). Мы используем рабочий процесс, основанный на проблемах, поэтому даже если у вас уже есть исправление ошибки, рассмотрите возможность открытия новой «Проблемы», а затем подайте «Запрос на извлечение», который решит вашу «Проблему». Более подробную информацию о содействии можно найти [здесь](https://github.com/BeamMP/BeamMP/blob/development/CONTRIBUTING.md).
|
||||
|
||||
Если у вас нет учетной записи GitHub или вы не знаете, как пользоваться GitHub, вы можете связаться с нами следующими способами:
|
||||
|
||||
- Если это не что-то деликатное, вы можете создать сообщение на нашем [Форуме BeamMP](https://forum.beammp.com) или сообщить об этом на нашем [Официальном Discord](https://discord.gg/beammp).
|
||||
- Если информация конфиденциальная, вы можете напрямую сообщить о проблеме нашему сотруднику в [Discord](https://discord.gg/beammp).
|
||||
@@ -0,0 +1,25 @@
|
||||
# Как узнать IP моего Сервера?
|
||||
|
||||
## Для серверов VPS-хостинга
|
||||
|
||||
Если вы размещаете сервер с помощью одного из наших партнерских хостинговых сервисов, IP будет опубликован в соответствующем интерфейсе управления сервером. Вы также можете найти IP для вашего сервера(ов) на веб-сайте [Keymaster](https://keymaster.beammp.com/login).
|
||||
|
||||
## Для домашних серверов
|
||||
|
||||
Для серверов, размещенных дома, откройте [whatsmyip.org](https://whatsmyip.org) в браузере. Это выведет публичный адрес IPv4, с которым с вами связываются из Интернета.
|
||||
|
||||
Обратите внимание, что 127.0.0.1 — это локальный адрес (localhost), и его можно использовать только самому себе, если сервер запущен на том же компьютере. Если у вас всё ещё возникают проблемы с подключением к серверу, размещённому дома, проверьте [проброс портов](https://docs.beammp.com/server/port-forwarding/), а также используйте CheckBeamMP
|
||||
|
||||
<form action="https://check.beammp.com/api/v2/beammp" method="get" target="_blank">
|
||||
<label for="ip">IP-адрес:</label>
|
||||
<input type="text" id="ip" name="ip"><br>
|
||||
<label for="port">Порт:</label>
|
||||
<input type="text" id="port" name="port"><br>
|
||||
<input type="submit" value="CheckBeamMP">
|
||||
</form>
|
||||
|
||||
## Как проверить наличие CGNAT?
|
||||
|
||||
Взгляните на [эту страницу](https://docs.beammp.com/FAQ/How-to-check-for-CGNAT/) , чтобы определить, можете ли вы разместить сервер дома или нет.
|
||||
|
||||
Теги: IP, Сервер, Сбой Подключения, 10060/10061
|
||||
@@ -0,0 +1,13 @@
|
||||
!!! Внимание! "Сайт находится в стадии разработки!"
|
||||
|
||||
```
|
||||
Работа над этим сайтом активно ведётся.
|
||||
|
||||
Считаете, что можете помочь? Пожалуйста, сделайте это, нажав на страницу с изображением карандаша справа!
|
||||
|
||||
Это можно сделать и на любой странице.
|
||||
```
|
||||
|
||||
# Фрагменты кода CEF для BeamNG.drive
|
||||
|
||||
список дел(to-do)
|
||||
@@ -0,0 +1,21 @@
|
||||
!!! внимание "Этот сайт находится в стадии разработки!"
|
||||
|
||||
```
|
||||
Над этим сайтом ведется активная работа.
|
||||
|
||||
Чувствуете, что можете помочь? Пожалуйста, сделайте это, нажав на страницу с карандашом справа!
|
||||
|
||||
Это можно сделать на любой странице.
|
||||
```
|
||||
|
||||
# Создание карты для BeamNG.drive
|
||||
|
||||
...
|
||||
|
||||
## Введение
|
||||
|
||||
...
|
||||
|
||||
## Начало работы
|
||||
|
||||
...
|
||||
@@ -0,0 +1,21 @@
|
||||
!!! внимание "Этот сайт находится в стадии разработки!"
|
||||
|
||||
```
|
||||
Над этим сайтом ведется активная работа.
|
||||
|
||||
Чувствуете, что можете помочь? Пожалуйста, сделайте это, нажав на страницу с карандашом справа!
|
||||
|
||||
Это можно сделать на любой странице.
|
||||
```
|
||||
|
||||
# Создание пропсов для BeamNG.drive
|
||||
|
||||
...
|
||||
|
||||
## Введение
|
||||
|
||||
...
|
||||
|
||||
## Начало работы
|
||||
|
||||
...
|
||||
@@ -0,0 +1,21 @@
|
||||
!!! внимание "Этот сайт находится в стадии разработки!"
|
||||
|
||||
```
|
||||
Над этим сайтом ведется активная работа.
|
||||
|
||||
Чувствуете, что можете помочь? Пожалуйста, сделайте это, нажав на страницу с карандашом справа!
|
||||
|
||||
Это можно сделать на любой странице.
|
||||
```
|
||||
|
||||
# Создание автомобиля для BeamNG.drive
|
||||
|
||||
...
|
||||
|
||||
## Введение
|
||||
|
||||
...
|
||||
|
||||
## Начало работы
|
||||
|
||||
...
|
||||
@@ -0,0 +1,11 @@
|
||||
!!! внимание "Этот сайт находится в стадии разработки!"
|
||||
|
||||
```
|
||||
Над этим сайтом ведется активная работа.
|
||||
|
||||
Чувствуете, что можете помочь? Пожалуйста, сделайте это, нажав на страницу с карандашом справа!
|
||||
|
||||
Это можно сделать на любой странице.
|
||||
```
|
||||
|
||||
# Введение в разработку BeamNG.drive
|
||||
@@ -0,0 +1,3 @@
|
||||
# imgui-windows.md
|
||||
|
||||
Эту страницу нужно заполнить
|
||||
@@ -0,0 +1,3 @@
|
||||
# lua-mods.md
|
||||
|
||||
Эту страницу нужно заполнить
|
||||
@@ -0,0 +1,274 @@
|
||||
# Создание UI-приложения
|
||||
|
||||
Для создания UI-приложения вам понадобятся некоторые знания фреймворка AngularJS, основную документацию можно найти здесь: [AngularJS docs](https://docs.angularjs.org/guide)
|
||||
|
||||
## Структура файла
|
||||
|
||||
Для работы UI-приложения необходимы четыре важных файла:
|
||||
|
||||
- app.js | Содержит основной код, используемый [документацией UI-приложения Javascript](https://developer.mozilla.org/en-US/docs/Web/JavaScript)
|
||||
- app.html | Код, который отображает [HTML-документы](https://developer.mozilla.org/fr/docs/Web/HTML) вашего приложения
|
||||
- app.json | Содержит информацию о UI-приложении
|
||||
- app.png | Файл изображения, отображаемый в селекторе приложений
|
||||
|
||||
### Стиль UI-приложения
|
||||
|
||||
Мы рекомендуем использовать тег `<style>` для стилизации вашего приложения. Файл .css тоже подойдет, но вы не сможете видеть изменения в режиме реального времени.
|
||||
|
||||
## Пример
|
||||
|
||||
Этот пример от DanielW. Отдельная ему благодарность
|
||||
|
||||
ui\modules\apps\ExampleApp\app.html
|
||||
|
||||
```html
|
||||
<div style="width: 100%; height: 100%;" class="bngApp">
|
||||
<link type="text/css" rel="stylesheet" href="/ui/modules/apps/ExampleApp/app.css" />
|
||||
|
||||
<div id="exampleAppContainer">
|
||||
<span>Gear: <span>{{ gearName }}</span></span>
|
||||
|
||||
<div layout="row" layout-align="center center">
|
||||
<md-input-container flex>
|
||||
<label>Input</label>
|
||||
<input ng-model="message" ng-keydown="sendMessage($event)">
|
||||
</md-input-container>
|
||||
|
||||
<md-button md-no-ink class="md-warn" ng-disabled="!message" ng-click="sendMessage()">Send</md-button>
|
||||
</div>
|
||||
|
||||
<span style="display: block">Messages:</span>
|
||||
|
||||
<!-- Область прокрутки -->
|
||||
<ul bng-nav-scroll style="margin: 0; padding: 0; overflow-y: auto; width: 100%; height: 100%; background-color: #37373740;">
|
||||
|
||||
<!-- Перебор сообщений и их отображение -->
|
||||
<li ng-repeat="message in messages track by $index" style="display: flex; align-items: center; height: 35px;">
|
||||
<span style="padding: 0 0.2em; width: 100%;">{{ message }}</span>
|
||||
|
||||
<!-- Кнопка для удаления сообщения, вызывает функцию `deleteMessage` в `app.js` -->
|
||||
<md-button md-no-ink class="md-icon-button md-warn" ng-click="deleteMessage($index)">
|
||||
<md-icon class="material-icons">delete</md-icon>
|
||||
</md-button>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
```
|
||||
|
||||
Здесь вы можете увидеть тег `<span>`, отображающий передачу вашего транспортного средства, входные данные, используемые для отправки сообщения функции `sendMessage()` в Javascript, и повторяющийся тег `<li>` использующий <b>ng-repeat</b> для переменной `messages`, расположенной в Javascript.
|
||||
|
||||
ui\modules\apps\ExampleApp\app.js
|
||||
|
||||
```js
|
||||
angular.module('beamng.apps')
|
||||
.directive('exampleApp', [function() {
|
||||
return {
|
||||
templateUrl: '/ui/modules/apps/ExampleApp/app.html',
|
||||
replace: true,
|
||||
restrict: 'EA',
|
||||
scope: true,
|
||||
|
||||
controller: ['$scope', function($scope) {
|
||||
$scope.gearName = '0'
|
||||
$scope.message = ''
|
||||
$scope.messages = []
|
||||
|
||||
// Настраиваем потоки, которые нам нужны. Пока что нам нужна только информация о двигателе.
|
||||
// Можно добавить больше, нужно будет просто поискать доступные потоки.
|
||||
let steamList = ['engineInfo']
|
||||
StreamsManager.add(steamList)
|
||||
|
||||
$scope.$on('destroy', function() {
|
||||
StreamsManager.remove(steamList)
|
||||
})
|
||||
|
||||
// Нужно ли вообще писать этот комментарий, объясняя, что делает эта функция?
|
||||
// Ну, я писал комментарии для многих других вещей, даже когда это было не нужно. Пусть уж этот останется...
|
||||
$scope.$on('streamsUpdate', function(event, streams) {
|
||||
if (!streams.engineInfo) // Ранний выход... Наверное, ты и без этого бесполезного комментария понял
|
||||
return;
|
||||
|
||||
// `lua/vehicle/controller/vehicleController.lua:538` (или можно использовать console.log)
|
||||
let gear = streams.engineInfo[5]
|
||||
|
||||
// Обновляем название передачи в HTML при необходимости
|
||||
if ($scope.gearName !== gear)
|
||||
$scope.gearName = gear
|
||||
})
|
||||
|
||||
$scope.sendMessage = function(event) {
|
||||
if (event && event.key !== 'Enter')
|
||||
return
|
||||
|
||||
if ($scope.message == '')
|
||||
return
|
||||
|
||||
// Передаём сообщение в Lua-расширение, чтобы оно его изменило
|
||||
bngApi.engineLua('extensions.exampleMod.modifyMessage("' + $scope.message + '")')
|
||||
$scope.message = ''
|
||||
}
|
||||
|
||||
$scope.deleteMessage = function(idx) {
|
||||
$scope.messages.splice(idx, 1)
|
||||
}
|
||||
|
||||
// Функция `modifyMessage` вызовет этот хук с изменёнными данными
|
||||
$scope.$on('MessageReady', function(_, modifiedMessage) {
|
||||
$scope.messages.push(modifiedMessage)
|
||||
});
|
||||
}]
|
||||
}
|
||||
}])
|
||||
```
|
||||
|
||||
Обратите внимание на использование <b>$scope{/b0}. Это очень важно, поскольку вам нужно будет определить переменные и функции в {b1}$scope</b>, чтобы иметь возможность доступа к ним из <b>Html</b> внутри любого тега <b>ng-*</b>. Таким образом, в этом примере после выполнения функции `sendMessage()` из <b>Html</b> она отправит его в файл lua, расположенный в каталоге расширений мода, и выполнит функцию `modifyMessage()` внутри этого файла lua.
|
||||
|
||||
Пример того, как может выглядеть сторона lua:
|
||||
|
||||
```lua
|
||||
local function modifyMessage(message)
|
||||
message = message .. " [Modified!]"
|
||||
guihooks.trigger('MessageReady', message)
|
||||
end
|
||||
```
|
||||
|
||||
^ Это упрощенная версия lua, просто показывающая функцию.
|
||||
|
||||
Основное внимание здесь уделяется использованию <b>guihooks.trigger</b>, который запускает событие AngularJS, определенное с помощью `$scope.$on()`. Как вы можете видеть в самом низу файла Javascript, событие называется MessageReady и будет выполнено функцией <b>guihooks.trigger</b> с полезной нагрузкой сообщения, а затем будет помещено в переменную `$scope.messages` для отображения тегом li с помощью <b>ng-repeat</b> в файле <b>Html</b>.
|
||||
|
||||
Полный файл lua находится ниже
|
||||
|
||||
lua\ge\extensions\exampleMod.lua
|
||||
|
||||
```lua
|
||||
local M = {}
|
||||
|
||||
--[[
|
||||
Это точка входа нашего расширения — именно её загружает игра из файла `modScript.lua`.
|
||||
В файле modScript можно загружать больше расширений и помещать их в ту же директорию, что и этот файл.
|
||||
|
||||
В этом файле мы будем взаимодействовать со следующими компонентами:
|
||||
1. Наше расширение для автомобиля. Оно сообщает этому расширению, когда нужно отправить данные, и мы их отправляем. См. `vehicle/extensions/auto/exampleVehicleExtension.lua`
|
||||
2. Ввод. См. `core/input/actions/myActions.json`. Когда привязанная клавиша нажата, вызывается `onActionKeyDown` (функция, экспортируемая ниже)
|
||||
]]
|
||||
|
||||
-- Хуки игровых функций
|
||||
--------------------------------------------
|
||||
local function onExtensionLoaded()
|
||||
log('D', "onExtensionLoaded", "Called")
|
||||
end
|
||||
|
||||
local function onExtensionUnloaded()
|
||||
log('D', "onExtensionUnloaded", "Called")
|
||||
end
|
||||
|
||||
-- Пользовательские функции
|
||||
--------------------------------------------
|
||||
local function onActionKeyDown()
|
||||
log('D', "onActionKeyDown", "Pressed!")
|
||||
end
|
||||
|
||||
local function onVehicleExtensionLoaded(vehID)
|
||||
log('D', "onVehicleExtensionLoaded", "Sending some data to the vehicle")
|
||||
|
||||
local veh = be:getObjectByID(vehID) -- Если у вас нет ID, можно также использовать `be:getPlayerVehicle(0)`, чтобы получить текущий автомобиль.
|
||||
if not veh then return end -- Обычная проверка на ошибки
|
||||
|
||||
local data = {
|
||||
["name"] = "Daniel W"
|
||||
}
|
||||
|
||||
veh:queueLuaCommand("extensions.exampleVehicleExtension.onDataReceived('" .. jsonEncode(data) .. "')")
|
||||
end
|
||||
|
||||
local function modifyMessage(message)
|
||||
message = message .. " [Modified!]"
|
||||
guihooks.trigger('MessageReady', message)
|
||||
end
|
||||
|
||||
-- Экспорт интерфейса
|
||||
--------------------------------------------
|
||||
M.onExtensionLoaded = onExtensionLoaded
|
||||
M.onExtensionUnloaded = onExtensionUnloaded
|
||||
|
||||
M.onActionKeyDown = onActionKeyDown
|
||||
M.onVehicleExtensionLoaded = onVehicleExtensionLoaded
|
||||
M.modifyMessage = modifyMessage
|
||||
|
||||
--[[ Другие функции могут включать:
|
||||
- onPreRender(dtReal, dtSim, dtRaw)
|
||||
- onUpdate(dtReal, dtSim, dtRaw)
|
||||
- onClientPreStartMission(levelPath)
|
||||
- onClientPostStartMission(levelPath)
|
||||
|
||||
Чтобы найти все возможные функции, выполните поиск в `BeamNG.Drive/lua` по следующему выражению: `extensions.hook(`
|
||||
--]]
|
||||
|
||||
return M
|
||||
```
|
||||
|
||||
Обратите внимание, что очень важно вернуть переменную M (модуль) с необходимыми функциями внутри! Например, без строки `M.modifyMessage = modifyMessage` функция `bngApi.engineLua('extensions.exampleMod.modifyMessage("' + $scope.message + '")')` не сможет найти функцию modifyMessage()
|
||||
|
||||
ui\modules\apps\ExampleApp\app.css
|
||||
|
||||
```css
|
||||
#exampleAppContainer {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
align-content: center;
|
||||
}
|
||||
|
||||
#exampleAppContainer > * {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
```
|
||||
|
||||
ui\modules\apps\ExampleApp\app.json
|
||||
|
||||
```json
|
||||
{
|
||||
"domElement": "<example-app></example-app>",
|
||||
"name": "Example App",
|
||||
"types": [
|
||||
"ui.apps.categories.debug"
|
||||
],
|
||||
"description": "example-app",
|
||||
"css": {
|
||||
"left": "0px",
|
||||
"height": "auto",
|
||||
"width": "270px",
|
||||
"min-width": "200px",
|
||||
"min-height": "90px",
|
||||
"top": "0px"
|
||||
},
|
||||
"author": "Daniel W",
|
||||
"version": "0.1",
|
||||
"directive": "exampleApp"
|
||||
}
|
||||
```
|
||||
|
||||
Директива должна быть такой же, как в файле <b>Javascript</b>
|
||||
|
||||
# Функции Javascript, предоставляемые BeamNG для UI-приложений
|
||||
|
||||
```js
|
||||
bngApi.engineLua("lua_path.function()")
|
||||
```
|
||||
|
||||
Полезно для запуска функции lua с аргументами или без них
|
||||
|
||||
# Функции Lua, предоставляемые BeamNG для UI-приложений
|
||||
|
||||
```lua
|
||||
guihooks.trigger("EventName", Payload)
|
||||
```
|
||||
|
||||
Полезная нагрузка может быть любого типа, но лучше хранить ее в виде массива/объекта или строки, чтобы она не потерялась.
|
||||
|
||||
<b>ВАЖНО</b> : Иногда может случиться так, что имя события, которое вы используете, уже используется внутри чего-то другого, и это вызовет проблемы, поэтому, например, если ваше приложение называется Nickel, хорошей практикой будет называть каждое событие Angular как NKEventName вместо EventName.
|
||||
@@ -0,0 +1,50 @@
|
||||
---
|
||||
hide:
|
||||
- навигация
|
||||
---
|
||||
|
||||
# Добро пожаловать в Сообщество BeamMP!
|
||||
|
||||
{width="450"} {width="450"}
|
||||
|
||||
## Наши страницы в социальных сетях
|
||||
|
||||
!!!сбой ""
|
||||
|
||||
```
|
||||
BeamMP Форум - [https://forum.beammp.com](https://forum.beammp.com)
|
||||
```
|
||||
|
||||
!!!цитата ""
|
||||
|
||||
```
|
||||
X (Twitter) - [https://x.com/BeamMPOfficial](https://x.com/BeamMPOfficial)
|
||||
```
|
||||
|
||||
!!!опасность ""
|
||||
|
||||
```
|
||||
YouTube - [https://www.youtube.com/@BeamMPOfficial](https://www.youtube.com/@BeamMPOfficial)
|
||||
```
|
||||
|
||||
!!!внимание ""
|
||||
|
||||
```
|
||||
Patreon - [https://www.patreon.com/c/BeamMP](https://www.patreon.com/c/BeamMP)
|
||||
```
|
||||
|
||||
!!!примечание ""
|
||||
|
||||
```
|
||||
Discord - [https://discord.com/invite/beammp](https://discord.com/invite/beammp)
|
||||
```
|
||||
|
||||
!!!информация ""
|
||||
|
||||
```
|
||||
BlueSky - [https://bsky.app/profile/beammpofficial.bsky.social](https://bsky.app/profile/beammpofficial.bsky.social)
|
||||
```
|
||||
|
||||
## Наши правила
|
||||
|
||||
Наши правила вы можете найти [здесь](rules.md)
|
||||
@@ -0,0 +1,53 @@
|
||||
---
|
||||
hide:
|
||||
- навигация
|
||||
---
|
||||
|
||||
# Правила сообщества BeamMP
|
||||
|
||||
!!! info BeamMP Персонал не обязан строго модерировать эти правила и может действовать по своему усмотрению. В дополнение к этим правилам применяются и соблюдаются [Правила Сообщества](https://discord.com/guidelines/) и [Условия Обслуживания](https://discord.com/terms/) Discord.
|
||||
|
||||
## Общие Правила BeamMP (Применяются к Discord, Форуму и Игре)
|
||||
|
||||
1. Никакой Дискриминации (например, сексизма, расизма и т. д.) :material-information-outline:{ title="Сюда входит использование расовых/сексуальных оскорблений или другой лексики, направленной против отдельного человека или группы людей, как напрямую, так и с намерением сделать это." }
|
||||
2. Никаких Издевательств или Притеснений :material-information-outline:{ title="Сюда входит нацеливание на отдельных лиц с использованием нежелательных действий, непрошеных личных сообщений или нацеливание на них с помощью сообщений, изображений или устного общения." }
|
||||
3. Никакого NSFW, Оскорбительного или Вредоносного Контента :material-information-outline:{ title="Сюда входит контент, содержащий вредоносные ссылки, наготу, порнографию, чрезмерную ненормативную лексику или материалы, которые иным образом являются оскорбительными, вредоносными и/или иным образом не подходят для общественных мест." }
|
||||
4. Запрет на Рассылку Спама в Текстовых/Голосовых Каналах или Сообщениях :material-information-outline:{ title="Сюда входит создание нескольких сообщений или тем, рассылка спама одинаковыми или похожими сообщениями, а также злоупотребление голосовыми каналами связи или другие действия, включающие спам-присоединение/выход из сообщества." }
|
||||
5. Говорите по-Английски :material-information-outline:{ title="Вся коммуникация в BeamMP должна вестись на английском языке, где это возможно, за исключением отдельных областей, обозначенных иным образом." }
|
||||
6. Никаких Ненадлежащих Профилей :material-information-outline:{ title="Сюда входят имена профилей, фотографии, биографии или другой контролируемый пользователем контент, который не соответствует правилам и условиям BeamMP/BeamNG/Discord." }
|
||||
7. Запрет на Доксинг :material-information-outline:{ title="Запрет на публикацию личной информации («доксинг») (включая, помимо прочего, настоящие имена, адреса, адреса электронной почты, пароли, информацию о банковских счетах и кредитных картах и т. д.)" }
|
||||
8. Никакой Политики :material-information-outline:{ title="Сюда входит обсуждение прошлых или текущих мировых событий за пределами BeamMP/BeamNG или игр в целом. Существуют места для обоснованного обсуждения этих тем, но BeamMP не входит в их число." }
|
||||
9. Никакой Рекламы не Относящейся к BeamMP/BeamNG Контенту :material-information-outline:{ title="Сюда входят не относящиеся к BeamMP сообщества, каналы социальных сетей или другие внешние ссылки. Это относится к публикациям в сообществе BeamMP, а также к отправке пользователям незапрошенных DM в целях личной рекламы." }
|
||||
10. Не Выдавайте Себя за Сотрудников :material-information-outline:{ title="Это включает в себя выдачу себя за сотрудника BeamMP или утверждение, что у вас есть способности, связанные с должностью сотрудника. Это также включает в себя имитацию сотрудников." }
|
||||
11. Никакой Эксплуатации :material-information-outline:{ title="Это включает в себя эксплуатацию любых ошибок или упущений для личной выгоды или для оказания негативного влияния на опыт других." }
|
||||
12. Категорически запрещается делиться ключами Authkey и использовать альтернативные учетные записи с целью увеличения количества ключей сверх установленного бесплатного лимита.
|
||||
13. Соблюдайте Все Указанные TOS :material-information-outline:{ title="Это важно, поскольку для использования нашего сервера Discord также необходимо соблюдать такие ограничения, как возрастное ограничение Discord (13+)." }
|
||||
14. Уважайте Всех :material-information-outline:{ title="Этого не стоит говорить, но вам нужно уважать всех вокруг вас и вести себя соответственно." }
|
||||
15. Придерживайтесь темы категории или канала. :material-information-outline:{ title="Это не должно быть сказано, но ваш контент должен соответствовать теме области, в которой вы публикуете информацию. Например, канал поддержки должен помогать людям или использоваться при поиске помощи." }
|
||||
16. Никаких излишних Заглавных Букв или Реакций/Эмодзи :material-information-outline:{ title="Пользователи должны воздерживаться от чрезмерного использования заглавных букв или эмодзи/реакций, чтобы не затемнять суть вопроса." }
|
||||
17. Перед тем, как оставлять сообщение в разделах поддержки, ознакомьтесь с [Часто Задаваемыми Вопросами по BeamMP](../../support/player-faq.md) и [Часто Задаваемыми Вопросами по Сообществу BeamMP](https://forum.beammp.com/c/faq/35).
|
||||
|
||||
## Правила Discord
|
||||
|
||||
1. Все Вышеуказанные Правила Применяются Здесь :material-information-outline:{ title="Все правила, упомянутые в этом документе, применяются к голосовым чатам." }
|
||||
2. Соблюдайте Условия и Правила Discord :material-information-outline:{ title="Соблюдайте все правила, изложенные Discord в Условиях и правилах" }
|
||||
3. Никаких Аудио/Трансляций NSFW :material-information-outline:{ title="Players should not stream any content that violates BeamMP rules and Discord TOS." }
|
||||
4. Вышеуказанное правило распространяется на игорные Сервисы/Веб-сайты.
|
||||
5. Не Используйте Чрезмерный Звук :material-information-outline:{ title="Excessively using soundboards, playing loud music or other uses of audio channels to intentionally agitate or target others is prohibited." }
|
||||
6. Не Спамьте Входами/Выходами :material-information-outline:{ title="Most users will have sound effects enabled, do not join and leave voice-chats rapidly." }
|
||||
7. Не Приставайте к Другим (`@'ing`) :material-information-outline:{ title="Это включает в себя повторные просьбы к другим дать ответ после того, как вас проигнорировали или сказали "нет"." }
|
||||
8. Держите команды для ботов в предназначенных для этого каналах.
|
||||
9. Никакой Ролевой Игры :material-information-outline:{ title="Это сделано для предотвращения проблем, возникающих из-за отсутствия контекста, или для предотвращения обхода пользователями определенных правил." }
|
||||
10. Не просите пользователей обращаться к вам в личные сообщения за помощью. Все вопросы, связанные с поддержкой, обсуждайте в специальном разделе поддержки на сервере BeamMP в Discord.
|
||||
11. Не предлагайте подключиться к компьютеру другого пользователя и воздерживайтесь от отправки неоднозначных, потенциально вредоносных и/или опасных файлов или расширений.
|
||||
12. Не давайте инструкций и/или ссылок о том, как скачивать пиратские версии, приобретать незаконные копии программного обеспечения, взламывать учетные записи (Beaming рус. "биминг") или использовать платные модификации.
|
||||
13. Не рекламируйте контент, не связанный с BeamNG/BeamMP. Отправлять медиа с вашего собственного канала разрешается только в специально предназначенном [медиа-канале](https://discord.com/channels/601558901657305098/705427325646274680).
|
||||
14. Следуйте указаниям сотрудников. Если вы считаете, что сотрудник злоупотребляет своей властью, отправьте личное сообщение их руководителю или менеджеру проекта.
|
||||
|
||||
## Как обжаловать действия против вас:
|
||||
|
||||
### Апелляции по запретам можно подавать на <a href="https://docs.google.com/forms/d/1MaTPKM-MHQU5lUtxeOKz3C7OoI6Xbu5RX5AJdX-UOz4" class="inline-onebox">Ban Appeal - BeamMP</a>.
|
||||
|
||||
Все апелляции на бан тщательно расследуются с участием как минимум двух (2) членов команды персонала/модераторов, которые не были вовлечены в рассматриваемое дело. Выдавший апелляцию сотрудник будет иметь право комментировать, но не будет иным образом участвовать в принятии решения по апелляции. Эти результаты апелляции являются окончательными. BeamMP оставляет за собой право разрешать или не разрешать членам, как они сочтут нужным, в соответствии с Правилами Сообщества BeamMP (см. выше), [Discord ToS](https://discord.com/terms) и другими факторами.
|
||||
|
||||
!!! warning В случае принятия мер против вас запрещено создавать новую учётную запись Discord или BeamMP для обхода бана.
|
||||
@@ -0,0 +1,43 @@
|
||||
# Участие в разработке BeamMP Docs
|
||||
|
||||
BeamMP использует [Material for MkDocs](https://squidfunk.github.io/mkdocs-material) в качестве своей темы. Это тема для [MkDocs](https://www.mkdocs.org). Полную документацию можно найти на их соответствующих сайтах.
|
||||
|
||||
## Начало работы
|
||||
|
||||
Чтобы внести свой вклад в эти документы, вы можете воспользоваться одним из двух подходов, изложенных ниже:
|
||||
|
||||
### 1. Редактировать необработанные файлы разметки
|
||||
|
||||
Редактирование необработанных файлов markdown — самый быстрый подход, который лучше всего подходит для быстрых правок, таких как орфография, грамматика или новые фрагменты контента. Однако этот подход требует предварительного знания markdown, поскольку вам нужно будет понимать, что даст ваш вклад.
|
||||
|
||||
Если вы предпочитаете именно этот подход, выполните следующие действия:
|
||||
|
||||
1. Нажмите «Изменить» на странице, которую вы хотите отредактировать.
|
||||
2. Создайте форк проекта в своей учетной записи GitHub.
|
||||
3. Внесите необходимые изменения.
|
||||
4. Сохраните изменения в своем форке.
|
||||
5. Подайте запрос на включение изменений в наш репозиторий [здесь](https://github.com/BeamMP/Docs).
|
||||
|
||||
После того, как вы создали свой pull request, один из руководителей BeamMP Mod Team рассмотрит ваш pull request и либо одобрит его, либо запросит некоторые изменения. Если изменения были запрошены и вы их выполнили, мы повторно рассмотрим ваш pull request. Затем ваши изменения будут объединены в репозиторий и автоматически развернуты в рамках нашей непрерывной интеграции.
|
||||
|
||||
### 2. Вносите изменения с предварительным просмотром в реальном времени
|
||||
|
||||
Редактирование наших документов таким способом по-прежнему будет осуществляться по тому же принципу, что и в варианте 1, однако вы сможете предварительно просмотреть свои изменения.
|
||||
|
||||
1. Нажмите «Изменить» на странице, которую вы хотите отредактировать.
|
||||
2. Создайте форк проекта в своей учетной записи GitHub.
|
||||
3. Клонируйте проект локально.
|
||||
4. Настройка материалов для MkDocs в соответствии с их руководством [здесь](https://squidfunk.github.io/mkdocs-material/getting-started/).
|
||||
5. Запустите `mkdocs serve`, чтобы запустить сервер документации с функцией перезагрузки в реальном времени, на который вы клонировали форк.
|
||||
6. Внесите изменения, которые считаете нужными.
|
||||
7. Сохраните изменения в своем форке.
|
||||
8. Подайте запрос на включение изменений в наш репозиторий [здесь](https://github.com/BeamMP/Docs).
|
||||
|
||||
## Макет проекта
|
||||
|
||||
```
|
||||
mkdocs.yml # The configuration file.
|
||||
docs/
|
||||
index.md # The documentation homepage.
|
||||
... # Other markdown pages, images and other files.
|
||||
```
|
||||
@@ -0,0 +1,24 @@
|
||||
# Коды Ошибок
|
||||
|
||||
На этой странице содержатся все коды ошибок, которые может отображать лаунчер.
|
||||
|
||||
---
|
||||
|
||||
Код | Описание | Возможное решение
|
||||
--- | --- | ---
|
||||
10048 | Что-то другое уже использует порт запуска | Убедитесь, что одновременно запущен только ОДИН экземпляр BeamMP-Launcher. Попробуйте перезагрузить ПК.
|
||||
10038 / 10060 / 10061 | Ни один сервер не ответил по указанному IP-адресу и/или порту | Если вы являетесь владельцем сервера, проверьте правила переадресации портов и/или брандмауэра, найденные на [BeamMP-Server](https://docs.beammp.com/server/create-a-server). Если вы не являетесь владельцем сервера, выберите другой сервер или свяжитесь с владельцем, если он вам известен.
|
||||
10054 | Сброс соединения пиром | Сервер, к которому вы подключаетесь, отключился.
|
||||
Не удалось найти игру, пожалуйста, запустите ее. Сообщите об этом, если проблема сохранится код 3. | Лаунчеру не удалось найти информацию об игре (каталог игры, каталог профиля, версию и т. д.) в записи реестра. | Запустите игру хотя бы один раз, чтобы создать значения реестра.
|
||||
Не удалось найти игру, пожалуйста, запустите ее. Сообщите об этом, если проблема сохранится код 4. | Программа запуска не смогла прочитать информацию об игре (каталог игры, каталог профиля, версию и т. д.) в записи реестра. | Эта ошибка чаще всего появляется у пользователей с **пиратскими копиями** игры. Если вы купили игру, запустите ее хотя бы один раз, чтобы были созданы значения реестра.
|
||||
Не удалось запустить игру! Лаунчер скоро закроется | Лаунчеру не удалось найти исполняемый файл игры. | Запустите игру хотя бы один раз, прежде чем снова запускать лаунчер.
|
||||
Игра закрыта! Лаунчер скоро закроется | Игра была закрыта. | Это сообщение появится при закрытии игры или если игра не запустится.
|
||||
Обновление лаунчера не удалось! | Лаунчеру не удалось загрузить новую версию | Проверьте подключение к Интернету и правила брандмауэра/антивируса, чтобы лаунчер не был заблокирован.
|
||||
Ошибка инициализации файла регистратора | Лаунчер не имеет возможности создавать файлы | Запустите лаунчер от имени администратора.
|
||||
Пожалуйста, закройте игру и попробуйте еще раз. | Игра уже открыта и лаунчер не может очистить папку `multiplayer/mods` | Закройте игру и повторите попытку.
|
||||
Пожалуйста, запустите игру хотя бы один раз. | Программа запуска пыталась, но не смогла изменить каталог игры. | Запустите игру хотя бы один раз, прежде чем снова запускать лаунчер.
|
||||
Основные серверы офлайн! Извините за неудобства! | Лаунчеру не удалось проверить наличие обновления | Проверьте подключение к интернету и правила брандмауэра. Если с вашей стороны проблем нет, проверьте [канал обновлений BeamMP](https://discord.com/channels/601558901657305098/697596153943949352) на нашем Discord.
|
||||
Извините, произошел сбой в работе системы бэкэнда! Не волнуйтесь, скоро все заработает! | Бэкэнд BeamMP не ответил | Проверьте подключение к интернету и правила брандмауэра. Если с вашей стороны проблем нет, проверьте [канал обновлений BeamMP](https://discord.com/channels/601558901657305098/697596153943949352) на нашем Discord.
|
||||
Застрял при обновлении | Лаунчер завис на этапе обновления и не переходит к следующему шагу. | Запустите лаунчер от имени администратора и проверьте правила антивируса, чтобы лаунчер не блокировался.
|
||||
|
||||
Если лаунчер сразу закрывается, проверьте файл `Launcher.log` в папке, куда вы установили BeamMP.
|
||||
@@ -0,0 +1,163 @@
|
||||
# Начиная
|
||||
|
||||
## **1. Совместимость**
|
||||
|
||||
BeamMP полностью совместим с Windows и Linux, совместимость с MacOS находится в разработке. Однако Linux и MacOS являются вторичными платформами, поэтому следует ожидать ошибок.
|
||||
|
||||
!!!предупреждение
|
||||
|
||||
```
|
||||
BeamMP не будет работать с пиратскими или устаревшими версиями BeamNG.drive.
|
||||
Служба поддержки BeamMP не оказывает помощь по вопросам, связанным с пиратскими/устаревшими копиями.
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## **2. Установка**
|
||||
|
||||
### **2а. Установка Windows**
|
||||
|
||||
!!!примечание
|
||||
|
||||
```
|
||||
По состоянию на 1 апреля 2026 года, согласно Windows Defender SmartScreen, установщик MSI является «неопознанным приложением».
|
||||
|
||||
Чтобы проигнорировать это предупреждение, нажмите «Подробнее», а затем нажмите «Запустить в любом случае».
|
||||
```
|
||||
|
||||
1. Перейдите на [сайт beammp.com](https://beammp.com/) и нажмите кнопку «Скачать сейчас».
|
||||
2. Запустите установщик `BeamMP_Installer.msi` и следуйте инструкциям.
|
||||
3. Значок BeamMP Launcher должен появиться на рабочем столе. Если нет, просто введите «BeamMP» в строку поиска Windows.
|
||||
|
||||
!!!примечание
|
||||
|
||||
```
|
||||
Поскольку при загрузке на карту с множеством созданных транспортных средств подключение может занять больше времени, чем ожидалось.
|
||||
```
|
||||
|
||||
### **2б. Установка Linux**
|
||||
|
||||
В настоящее время вам необходимо самостоятельно собрать Launcher. Для этого вам необходимо базовое понимание того, как собрать приложение.
|
||||
|
||||
Убедитесь, что у вас установлены базовые инструменты разработки, которые обычно входят в пакеты, например:
|
||||
|
||||
- Debian/Ubuntu: `sudo apt install build-essential`
|
||||
- Fedora: `sudo dnf install cmake gcc gcc-c++ make perl perl-IPC-Cmd perl-FindBin perl-File-Compare perl-File-Copy kernel-headers kernel-devel`
|
||||
- Arch: `sudo pacman -S base-devel`
|
||||
- openSUSE: `zypper in -t pattern devel-basis`
|
||||
- SteamOS (Arch): `sudo pacman -S base-devel linux-api-headers glibc libconfig` (Вам также необходимо выполнить команду `sudo steamos-readonly disable` , но не забудьте включить ее снова после установки пакетов)
|
||||
|
||||
Склонируйте `vcpkg`, выполните его начальную сборку (bootstrap) и добавьте в PATH
|
||||
|
||||
1.
|
||||
|
||||
```bash
|
||||
git clone https://github.com/microsoft/vcpkg.git
|
||||
```
|
||||
|
||||
1.
|
||||
|
||||
```bash
|
||||
./vcpkg/bootstrap-vcpkg.sh
|
||||
```
|
||||
|
||||
1.
|
||||
|
||||
```bash
|
||||
export VCPKG_ROOT="$(pwd)/vcpkg"
|
||||
export PATH=$VCPKG_ROOT:$PATH
|
||||
```
|
||||
|
||||
Клонируйте репозиторий BeamMP-Launcher в свою систему с помощью `git`, например: `git clone https://github.com/BeamMP/BeamMP-Launcher.git` [Дополнительная информация о клонировании репозитория GitHub](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository)
|
||||
|
||||
Переключитесь на тег, который использовался для [последнего релиза](https://github.com/BeamMP/BeamMP-Launcher/releases/latest). Например, если в последнем релизе использовался `v2.6.4`, выполните команду `git checkout v2.6.4`
|
||||
|
||||
Если вы использовали пример команды клонирования, который мы предоставили, вы можете использовать `cd BeamMP-Launcher`, чтобы перейти в корневой каталог проекта.
|
||||
|
||||
В корневом каталоге проекта,
|
||||
|
||||
1.
|
||||
|
||||
```cmake
|
||||
cmake . -B bin -DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-linux
|
||||
```
|
||||
|
||||
1.
|
||||
|
||||
```cmake
|
||||
cmake --build bin --parallel
|
||||
```
|
||||
|
||||
!!!примечание ""
|
||||
|
||||
```
|
||||
Если во время сборки не хватит оперативной памяти, можно исключить параметр --parallel — в этом случае сборка будет выполняться только в одном потоке процессора, что позволит сократить объем используемой оперативной памяти.
|
||||
```
|
||||
|
||||
!!!примечание ""
|
||||
|
||||
```
|
||||
Не указывая `-DCMAKE_BUILD_TYPE=Release`, вы создаете отладочную версию, которая больше по размеру файла, но не содержит ошибки, из-за которой программа запуска может подключиться к серверу только один раз.
|
||||
```
|
||||
|
||||
!!!примечание "Пользователи Fedora" Если vcpkg выдаёт ошибку при компиляции OpenSSL из-за заголовков ядра, убедитесь, что все зависимости установлены: `bash sudo dnf install kernel-headers kernel-devel gcc gcc-c++ make perl` Затем очистите кэш vcpkg: `bash rm -rf $VCPKG_ROOT/buildtrees/openssl` И повторите команду конфигурации cmake.
|
||||
|
||||
Переместите готовое приложение из папки `/bin` в отдельную папку и запустите его оттуда:
|
||||
|
||||
```bash
|
||||
mkdir -p ~/beammp-launcher
|
||||
cp bin/BeamMP-Launcher ~/beammp-launcher/
|
||||
cd ~/beammp-launcher
|
||||
./BeamMP-Launcher
|
||||
```
|
||||
|
||||
Нативный Linux-ланчер BeamMP запустится и будет использовать нативную версию BeamNG.drive для Linux
|
||||
|
||||
### **2c. Использование beamNG.drive с Proton**
|
||||
|
||||
Если вы хотите использовать родной Linux BeamMP-Launcher вместе с BeamNG.drive, работающим через Proton, вы можете сделать это:
|
||||
|
||||
Запустите BeamMP-Launcher, используя аргумент `--no-launch` (Это не позволит Launcher запустить собственный Linux BeamNG.drive). Дополнительную информацию об аргументах Launcher можно найти в [разделе Настройка среды разработки](../guides/beammp-dev/beammp-dev.md)
|
||||
|
||||
Измените расположение пользовательской папки Proton-BeamNG.drive на расположение Linux-BeamNG.drive (поскольку собственный Linux BeamMP-Launcher в настоящее время записывает только в пользовательскую папку Linux-BeamNG.drive)
|
||||
|
||||
Это можно сделать, например, создав символическую ссылку
|
||||
|
||||
- Запомните местоположение пользовательской папки Linux-BeamNG.drive (обычно она находится в `~/.local/share/BeamNG.drive`) и переименуйте ее, например, в `BeamNG.drive_old`
|
||||
- Обратите внимание на расположение пользовательской папки Proton-BeamNG.drive (обычно она находится в `~/.local/share/Steam/steamapps/compatdata/284160/pfx/drive_c/users/steamuser/AppData/Local/BeamNG.drive`)
|
||||
- Создайте символическую ссылку между обеими папками пользователей `ln -s ~/.local/share/Steam/steamapps/compatdata/284160/pfx/drive_c/users/steamuser/AppData/Local/BeamNG.drive ~/.local/share`
|
||||
|
||||
После установки символической ссылки между пользовательскими папками и скомпилированным лаунчером вы можете заставить Steam запустить игру через Proton, при этом лаунчер автоматически запустится со следующей заменой параметров запуска для оригинальной игры, которые можно найти в окне «Свойства» игры в ее записи в Steam:
|
||||
|
||||
- `~/BeamMP/BeamMP-Launcher --no-launch & %command% ; killall BeamMP-Launcher`
|
||||
|
||||
Обратите внимание, что это предполагает, что вы поместили скомпилированный ранее двоичный файл лаунчера в `/home/user/BeamMP/`, поэтому измените его так, чтобы он соответствовал месту, куда вы поместили готовый двоичный файл, и вам придется перекомпилировать лаунчер с правильной веткой git каждый раз при выпуске обновления лаунчера.
|
||||
|
||||
!!! совет "Добавление шрифта эмодзи для получения эмодзи в тексте"
|
||||
|
||||
```
|
||||
Для того чтобы эмодзи отображались в списке серверов (как часть пользовательского имени сервера) или во внутриигровом чате, вам нужен шрифт, содержащий эмодзи.
|
||||
|
||||
Это можно сделать, например, добавив [Linux-версию шрифта эмодзи Segoe-UI для Windows](https://github.com/mrbvrz/segoe-ui-linux)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## **3. Использование BeamMP**
|
||||
|
||||
1. После запуска лаунчера вы увидите окно терминала. Вскоре после этого должен запуститься стандартный лаунчер BeamNG. **Не** закрывайте окно терминала.
|
||||
2. В главном меню BeamNG.drive нажмите кнопку `Repository` и убедитесь, что включен <strong>только</strong> мод <code>multiplayerbeammp</code> .
|
||||
3. Выйдите в главное меню, нажмите «Ещё..», затем кнопку «Мультиплеер», чтобы начать игру по сети.
|
||||
4. Вам будет предложено войти или играть в качестве гостя (не все серверы допускают гостей). Вы можете создать учетную запись на нашем [форуме](https://forum.beammp.com), а затем войти в BeamMP с теми же учетными данными.
|
||||
5. Выберите любой понравившийся вам сервер и нажмите `Connect`. Наслаждайтесь!
|
||||
|
||||
---
|
||||
|
||||
## **4. Известные проблемы**
|
||||
|
||||
- Нативный linux BeamMP-Launcher в настоящее время может подключиться к серверу только один раз, после отключения вам нужно перезапустить лаунчер. Вы можете сделать это, не закрывая игру между
|
||||
- Если вы не видите кнопку «Мультиплеер». Убедитесь, что мод BeamMP присутствует и активирован в «Менеджере модов», затем попробуйте нажать CTRL + L.
|
||||
- VPN любого типа могут вызывать проблемы с подключением.
|
||||
- Если Launcher сообщает о каких-либо ошибках, прочтите [FAQ](https://forum.beammp.com/c/faq/35).
|
||||
|
||||
Если вам потребуется дополнительная помощь с установкой, вы можете создать сообщение на нашем [форуме](https://forum.beammp.com) или задать вопрос на нашем [сервере Discord](https://discord.gg/beammp).
|
||||
@@ -0,0 +1,323 @@
|
||||
# Настройки Мультиплеера
|
||||
|
||||
## **1. Общие**
|
||||
|
||||
??? setting "Продвинутые настройки"
|
||||
|
||||
```
|
||||
Если включено, будут видны все настройки многопользовательской игры
|
||||
|
||||
Если выключено, видны только базовые настройки
|
||||
```
|
||||
|
||||
??? setting "Включить защиту от клонирования конфигурации"
|
||||
|
||||
```
|
||||
Если включено, конфигурация вашего транспортного средства будет защищена от сохранения другими игроками
|
||||
|
||||
Если выключено, другие игроки смогут сохранить вашу конфигурацию
|
||||
```
|
||||
|
||||
??? setting "Отключить паузу из-за нестабильностей"
|
||||
|
||||
```
|
||||
Если включено, физические нестабильности не будут останавливать игру
|
||||
|
||||
Если выключено, нестабильности будут вызывать паузу
|
||||
|
||||
!!! note ""
|
||||
|
||||
Рекомендуется оставить выключенным, так как повторяющиеся нестабильности могут привести к крашу игры
|
||||
```
|
||||
|
||||
??? setting "Использовать упрощённые транспортные средства, если доступны"
|
||||
|
||||
```
|
||||
Если включено, транспортные средства других игроков будут заменяться упрощёнными моделями (как в AI-трафике), если они доступны
|
||||
|
||||
Если выключено, будут использоваться оригинальные модели
|
||||
```
|
||||
|
||||
??? setting "Новое меню чата"
|
||||
|
||||
```
|
||||
Если включено, чат отображается в окне [IMGUI](https://github.com/ocornut/imgui), которое можно, например, переместить на другой монитор
|
||||
|
||||
Если выключено, чат отображается в стандартном UI приложении
|
||||
|
||||
!!! note ""
|
||||
|
||||
Перетаскивание IMGUI окон может снизить производительность и сбивать программы записи экрана, записывая окно чата вместо основного окна игры
|
||||
```
|
||||
|
||||
??? setting "Включить сглаживание положения автомобиля"
|
||||
|
||||
```
|
||||
Если включено, BeamMP будет использовать алгоритм для сглаживания обновлений позиции транспортного средства через регулярные интервалы. Это может быть полезно для игроков с высоким пингом или при высокой потере пакетов
|
||||
|
||||
Если выключено, BeamMP будет обновлять позиции транспортных средств по мере их получения
|
||||
```
|
||||
|
||||
??? setting "Пропускать предупреждение безопасности модов"
|
||||
|
||||
```
|
||||
Если включено, всплывающее окно с предупреждением о безопасности модов не будет отображаться при подключении к серверу с модами
|
||||
|
||||
Если выключено, предупреждение будет показываться каждый раз при подключении к серверу с модами
|
||||
```
|
||||
|
||||
??? setting "Включить очередь обновлений/редактирования"
|
||||
|
||||
```
|
||||
Если включено, спавн и изменения транспортных средств других игроков будут помещаться в очередь. Подробнее см. раздел `2. Очередь событий`
|
||||
|
||||
Если выключено, спавн и изменения транспортных средств других игроков будут загружаться мгновенно
|
||||
```
|
||||
|
||||
??? setting "Включить автоматическую синхронизацию деталей"
|
||||
|
||||
```
|
||||
Если включено, детали вашего транспортного средства автоматически синхронизируются с другими игроками через несколько секунд
|
||||
|
||||
Если выключено, необходимо вручную нажимать кнопку синхронизации деталей в меню выбора деталей для отправки синхронизации другим игрокам
|
||||
```
|
||||
|
||||
??? setting "Выключить переключение на машины других игроков"
|
||||
|
||||
```
|
||||
Если включено, переключение между транспортными средствами пропустит машины других игроков
|
||||
|
||||
Если выключено, переключение будет происходить по всем доступным транспортным средствам
|
||||
```
|
||||
|
||||
??? setting "Сделать машины прозрачными при приближении"
|
||||
|
||||
```
|
||||
Если включено, другие машины будут постепенно исчезать по мере приближения
|
||||
|
||||
Если выключено, другие машины будут полностью видимы независимо от расстояния
|
||||
|
||||
!!! note ""
|
||||
|
||||
Это влияет только на видимую 3D-модель машины, а не на физическую mesh-сетку. Чтобы также отключить физику, необходимо включить `Упрощённая физика столкновений` в настройках игры
|
||||
```
|
||||
|
||||
??? setting "Показывать ID игроков"
|
||||
|
||||
```
|
||||
Если включено, в списке игроков появится дополнительная колонка с ID каждого игрока. Полезно для разработки или модерации
|
||||
|
||||
Если выключено, список игроков будет показывать только имя игрока и пинг
|
||||
```
|
||||
|
||||
??? setting "Разрешить обновление списка серверов в игре"
|
||||
|
||||
```
|
||||
Если включено, список серверов будет обновляться с регулярными интервалами во время игры. Это может вызвать лаги
|
||||
|
||||
Если выключено, список серверов обновляется только при открытии главного меню
|
||||
```
|
||||
|
||||
## **2. Очередь событий**
|
||||
|
||||
??? setting "Выделить игроков в очереди"
|
||||
|
||||
```
|
||||
Если включено, игроки с ожидающими событиями будут выделены в списке игроков
|
||||
|
||||
Если выключено, игроки не будут выделяться индивидуально
|
||||
```
|
||||
|
||||
??? setting "Выделять игроков с очередью"
|
||||
|
||||
```
|
||||
Если установлено `Левая кнопка мыши`, клик по имени игрока в списке левой кнопкой мыши загрузит ожидающие события, правая кнопка — позволит наблюдать за игроком
|
||||
|
||||
Если установлено `Правая кнопка мыши`, клик правой кнопкой мыши загрузит ожидающие события, левая кнопка — позволит наблюдать
|
||||
```
|
||||
|
||||
??? setting "Автоматизировать очередь"
|
||||
|
||||
```
|
||||
Если включено, события из очереди будут автоматически загружены после того, как ваш транспорт опустится ниже порога скорости на установленное время таймаута
|
||||
|
||||
Если выключено, события загружаются вручную, через кнопку `События` в верхней части экрана или клик по имени игрока в списке
|
||||
```
|
||||
|
||||
??? setting "Порог скорости для срабатывания очереди"
|
||||
|
||||
```
|
||||
Этот параметр определяет порог скорости для автоматической загрузки событий из очереди. Ваш транспорт должен быть медленнее этого порога дольше, чем `Таймаут срабатывания очереди`, чтобы события были загружены
|
||||
```
|
||||
|
||||
??? setting "Таймаут срабатывания очереди"
|
||||
|
||||
```
|
||||
Этот параметр определяет задержку времени для автоматической загрузки событий из очереди. Ваш транспорт должен быть медленнее `Порог скорости для срабатывания очереди` в течение этого времени, чтобы события были загружены
|
||||
```
|
||||
|
||||
??? setting "Не использовать очередь в режиме наблюдения"
|
||||
|
||||
```
|
||||
Если включено, событие будет загружено мгновенно, если вы наблюдаете за другим игроком
|
||||
|
||||
Если выключено, событие будет помещено в очередь, как при фокусе на вашем транспортном средстве
|
||||
```
|
||||
|
||||
??? setting "Не использовать очередь с Юнициклами (Снеговиками/Бимлингсами)"
|
||||
|
||||
```
|
||||
Если включено, событие, связанное с снеговиком или бимлингом, будет загружено мгновенно
|
||||
|
||||
Если выключено, снеговики/бимлинги будут помещены в очередь, как и другие машины
|
||||
```
|
||||
|
||||
## **3. Настройка стандартного Юницикла**
|
||||
|
||||
??? setting "Конфигурация Юницикла по Умолчанию"
|
||||
|
||||
```
|
||||
Этот параметр определяет вариант юницикла, который будет загружаться по умолчанию. Можно выбрать между готовыми конфигурациями или своими сохранёнными настройками
|
||||
```
|
||||
|
||||
??? setting "Автоматически сохранять последний использованный Юницикл"
|
||||
|
||||
```
|
||||
Если включено, последний использованный юницикл автоматически сохранится и загрузится при следующем спавне
|
||||
|
||||
Если выключено, будет спавниться конфигурация по умолчанию
|
||||
```
|
||||
|
||||
## **4. Капли**
|
||||
|
||||
??? setting "Использовать капли для незаспавнившегося автомобиля"
|
||||
|
||||
```
|
||||
Если включено, вместо незаспавненного транспортного средства будет отображаться placeholder-объект (капля)
|
||||
|
||||
Если выключено, незаспавненный транспорт будет невидим
|
||||
```
|
||||
|
||||
??? setting "Изменить цвет"
|
||||
|
||||
```
|
||||
??? setting "Видимость"
|
||||
|
||||
Если включено, капля будет нарисована с использованием выбранного цвета.
|
||||
|
||||
Если выключено, капля отображаться не будет.
|
||||
|
||||
??? setting "RGB HEX значения"
|
||||
|
||||
Ожидаемый транспорт: цвет капли при очереди на спавн, стандарт #FF6400
|
||||
|
||||
Незаконный транспорт: цвет капли для запрещенного транспорта (например, через сторонний мод), стандарт #000000
|
||||
|
||||
Удалённый транспорт: цвет капли для удалённого пользователем транспорта, стандарт #333333
|
||||
```
|
||||
|
||||
## **5. Ники**
|
||||
|
||||
??? setting "Скрыть ники игроков"
|
||||
|
||||
```
|
||||
Если включено, ники игроков не отображаются
|
||||
|
||||
Если выключено, ники игроков отображаются в зависимости от позиции их машин
|
||||
```
|
||||
|
||||
??? setting "Показывать дистанцию до других игроков"
|
||||
|
||||
```
|
||||
Если включено, к нику будет добавлено расстояние до соответствующего транспортного средства
|
||||
|
||||
Если выключено, расстояние отображаться не будет
|
||||
```
|
||||
|
||||
??? setting "Включить/выключть исчезновение ников"
|
||||
|
||||
```
|
||||
Если включено, ники будут появляться/исчезать в зависимости от `Дистанция исчезновения ников` и `Инвертировать направление исчезновения`
|
||||
|
||||
Если выключено, ники будут отображаться с обычной непрозрачностью вне зависимости от расстояния
|
||||
```
|
||||
|
||||
??? setting "Дистанция исчезновения ников/Инвертировать направление исчезновения"
|
||||
|
||||
```
|
||||
!!! setting "Исчезновение"
|
||||
|
||||
Ники становятся менее видимыми, чем дальше находится игрок
|
||||
|
||||
`Дистанция исчезновения ников` определяет расстояние, на котором ник отображается с минимальной непрозрачностью
|
||||
|
||||
!!! setting "Появление"
|
||||
|
||||
Ники становятся более видимыми, чем дальше находится игрок
|
||||
|
||||
`Дистанция исчезновения ников` определяет расстояние, на котором ник отображается с максимальной непрозрачностью
|
||||
```
|
||||
|
||||
??? setting "Не скрывать ники полностью"
|
||||
|
||||
```
|
||||
Если включено, ники не могут быть полностью невидимыми, сохраняется минимальная непрозрачность вне зависимости от расстояния
|
||||
|
||||
Если выключено, ники могут стать полностью невидимыми
|
||||
```
|
||||
|
||||
??? setting "Обрезать длинные никнеймы и роли"
|
||||
|
||||
```
|
||||
Если включено, `Лимит длины ника` обрежет ники и роли до установленного числа символов
|
||||
|
||||
Если выключено, ники и роли отображаются полностью
|
||||
```
|
||||
|
||||
??? setting "Показать наблюдателей под ником автомобиля"
|
||||
|
||||
```
|
||||
Если включено, под ником игрока будет отображаться имя наблюдателя
|
||||
|
||||
Если выключено, имена наблюдателей не отображаются
|
||||
```
|
||||
|
||||
??? setting "Показывать никнеймы наблюдателей серым цветом независимо от их роли"
|
||||
|
||||
```
|
||||
Если включено, ник наблюдателя всегда будет окружён серым фоном
|
||||
|
||||
Если выключено, фон будет отражать роль наблюдателя цветом
|
||||
```
|
||||
|
||||
## **6. Другие**
|
||||
|
||||
??? setting "Показывать сетевую активность в консоле"
|
||||
|
||||
```
|
||||
Если включено, активность сети BeamMP будет отображаться в консоле
|
||||
|
||||
Если выключено, активность сети не будет отображаться
|
||||
|
||||
!!! danger ""
|
||||
|
||||
Будьте осторожны с этой настройкой, так как весь вывод консоли также записывается в лог-файлы
|
||||
|
||||
При включении эта настройка может привести к росту файлов логов на сотни мегабайт за считанные минуты
|
||||
```
|
||||
|
||||
??? setting "Порт лаунчера"
|
||||
|
||||
```
|
||||
Этот параметр определяет порт для связи с лаунчером
|
||||
|
||||
Изменять следует только если стандартный порт 4444 использовать нельзя
|
||||
|
||||
Не забудьте также изменить его в конфигурации лаунчера `launcher.cfg`
|
||||
|
||||
!!! tip ""
|
||||
|
||||
Указанный порт — первый из двух. Второй порт используется сразу после него, то есть порт + 1
|
||||
|
||||
Первый порт передаёт основные сетевые пакеты, второй — игровые пакеты, оба через TCP
|
||||
```
|
||||
@@ -0,0 +1,75 @@
|
||||
# Начало работы
|
||||
|
||||
Чтобы начать разработку для BeamMP вам понадобится как минимум:
|
||||
|
||||
- BeamNG.drive, установленный локально
|
||||
- BeamMP, установленный локально; как минимум лаунчер, дополнительно также сервер
|
||||
- Git, установленный локально, и учетная запись GitHub.com
|
||||
- Редактор кода, например VSCode или notepad++
|
||||
|
||||
---
|
||||
|
||||
# Разница между модом, лаунчером и сервером
|
||||
|
||||
BeamMP разделен на три основные части:
|
||||
|
||||
- Мод загружается BeamNG, как и любой другой мод транспортного средства или пользовательского интерфейса для игры. Его основная функция — установить локальное соединение с лаунчером и отобразить элементы многопользовательского пользовательского интерфейса. Он в основном написан на Lua, с некоторым количеством JavaScript, HTML и CSS для элементов пользовательского интерфейса. Его репозиторий — [https://github.com/BeamMP/BeamMP](https://github.com/BeamMP/BeamMP)
|
||||
- Основная функция лаунчера — установить постоянное соединение с модом, а при необходимости — и с выбранным сервером, а также обрабатывать вход пользователя с помощью бэкенда BeamMP. Он написан на C++, предварительно скомпилирован BeamMP и его можно найти по адресу [https://github.com/BeamMP/BeamMP-Launcher](https://github.com/BeamMP/BeamMP-Launcher)
|
||||
- Сервер устанавливает соединения между одним или несколькими лаунчерами, а также «пульсирует» бэкенд BeamMP, предоставляя такую информацию, как IP, порт, версия, количество игроков и т. д. Кроме того, он управляет и запускает серверные плагины Lua. Он написан на C++, предварительно скомпилирован BeamMP для нескольких различных архитектур ОС и ЦП и может быть найден по адресу [https://github.com/BeamMP/BeamMP-Server](https://github.com/BeamMP/BeamMP-Server)
|
||||
|
||||
---
|
||||
|
||||
# Настройка среды разработки для работы над модом
|
||||
|
||||
## Использование распакованной папки для BeamNG
|
||||
|
||||
Для эффективной работы с модами в BeamNG рекомендуется использовать `unpacked` папку, а не упаковывать zip-архивы после каждого изменения.
|
||||
|
||||
Откройте папку пользователя BeamNG, перейдя в `%appdata%/Local/BeamNG.drive/0.xx/mods`, где `xx` — последняя версия BeamNG. Создайте папку с именем `unpacked` внутри папки `mods`.
|
||||
|
||||
Дополнительную информацию о папке пользователя можно найти по адресу [https://documentation.beamng.com/support/userfolder/](https://documentation.beamng.com/support/userfolder/)
|
||||
|
||||
## Включение режима разработчика в лаунчере BeamMP
|
||||
|
||||
Чтобы предотвратить удаление вашего локального клона git автоматическим обновлением, необходимо отключить его с помощью `--no-download`. Если вы также не хотите, чтобы лаунчер запускал BeamNG, и хотели бы видеть отладочные распечатки, то рекомендуется использовать `--dev`.
|
||||
|
||||
Аргумент | Примечание
|
||||
:-- | :--
|
||||
`--help` или `-h` | Выведет следующий список аргументов
|
||||
`--port <port>` или `-p` | Измените порт прослушивания по умолчанию на `<port>`. Это также должно быть настроено в игре
|
||||
`--verbose` или `-v` | Подробный режим, выводит отладочные сообщения
|
||||
`--no-download` | Пропустить загрузку и установку мода BeamMP Lua
|
||||
`--no-update` | Пропустить применение обновлений лаунчера (необходимо выполнить обновление вручную)
|
||||
`--no-launch` | Пропустить запуск игры (игру необходимо запустить вручную)
|
||||
`--dev` | Режим разработчика, то же самое, что и --verbose --no-download --no-launch --no-update
|
||||
`--game <args...>` или `-- <args...>` | Передает аргументы в игру
|
||||
|
||||
## Клонирование репозитория BeamMP в распакованную папку
|
||||
|
||||
Хотя вы можете вручную скопировать файлы модов BeamMP из нашего репозитория github, настоятельно рекомендуется использовать систему управления исходным кодом, например git. Сначала создайте форк [https://github.com/BeamMP/BeamMP](https://github.com/BeamMP/BeamMP)
|
||||
|
||||
Наиболее эффективным было бы клонировать репозиторий непосредственно в `unpacked` папку.
|
||||
|
||||
Для `git` запустите `git clone https://github.com/yourName/BeamMP` из PowerShell или окна CMD, запущенного из `unpacked` папки. Находясь в папке userfolder, убедитесь, что в `mods` не осталось папки `multiplayer` и что теперь есть `unpacked/beammp`.
|
||||
|
||||
Теперь попробуйте режим разработчика. Запустите лаунчер BeamMP, запустите BeamNG вручную, после входа в игру убедитесь, что BeamMP — единственный активный мод. Вы должны иметь возможность использовать BeamMP как обычно.
|
||||
|
||||
Используя редактор кода, вы теперь можете добавлять или изменять код непосредственно в `unpacked` папке. Затем вы можете попробовать изменения, перезагрузив Lua в игре, нажав `Ctrl+L` (и `F5` если вы внесли изменения в пользовательский интерфейс).
|
||||
|
||||
Как только вы будете довольны своими изменениями, вы можете зафиксировать их через git. Посетите [веб-сайт Git-SCM](https://git-scm.com/doc) для получения руководств и документации по использованию Git. Как только ваши изменения будут зафиксированы и отправлены (в ваш форк), вы можете сделать запрос на извлечение.
|
||||
|
||||
Если у вас возникнут какие-либо проблемы, смело задавайте их на канале #scripting в нашем [Discord](https://discord.gg/beammp).
|
||||
|
||||
---
|
||||
|
||||
# Настройка локального сервера
|
||||
|
||||
При работе с BeamMP может быть полезно использовать локальный сервер. Вы можете следовать общей [установке сервера](../../server/create-a-server.md) , пропуская первые два шага для чисто локальных подключений.
|
||||
|
||||
Установите сервер как закрытый в `serverConfig.toml`, используя любую строку в качестве `AuthKey`.
|
||||
|
||||
---
|
||||
|
||||
# Правила Внесения Вклада
|
||||
|
||||
Подробную информацию о формате кода, формате сообщения о коммите, общих рекомендациях по разработке и т. д. см. в файле `CONTRIBUTING.md` в каждом репозитории. Этот файл содержит более подробную информацию о том, как внести свой вклад. Файл `README.md` в каждом репозитории обычно также содержит шаги сборки (для скомпилированных проектов).
|
||||
@@ -0,0 +1,21 @@
|
||||
---
|
||||
title: Руководства
|
||||
description: Этот набор страниц содержит некоторые основные руководства по BeamMP.
|
||||
status: новый
|
||||
---
|
||||
|
||||
!!! внимание "Этот сайт находится в стадии разработки!"
|
||||
|
||||
```
|
||||
Над этим сайтом ведется активная работа.
|
||||
|
||||
Чувствуете, что можете помочь? Пожалуйста, сделайте это, нажав на страницу с карандашом справа!
|
||||
|
||||
Это можно сделать на любой странице.
|
||||
```
|
||||
|
||||
# Руководства по Разработке BeamMP
|
||||
|
||||
Эта страница будет представлять собой введение и предисловие к созданию клиентского и серверного контента.
|
||||
|
||||
Эту страницу еще нужно доработать.
|
||||
@@ -0,0 +1,101 @@
|
||||
# Создание многопользовательских модов
|
||||
|
||||
## Структура папок и основы файлов
|
||||
|
||||
Базовая структура папок и файлов должна выглядеть следующим образом:
|
||||
|
||||
```
|
||||
Resources/
|
||||
├─ Client/
|
||||
│ └─ examplePlugin.zip/
|
||||
│ ├─ scripts/
|
||||
│ │ └─ modScript.lua
|
||||
│ └─ lua/
|
||||
│ └─ ge/
|
||||
│ └─ extensions/
|
||||
│ └─ examplePlugin.lua
|
||||
└─ Server/
|
||||
└─ examplePlugin/
|
||||
├─ examplePlugin.lua
|
||||
└─ further_lua/
|
||||
└─ further.lua
|
||||
```
|
||||
|
||||
Серверный lua — это необходимый минимум, если вы хотите добавлять пользовательские события, вам также понадобится как минимум клиентский lua, а также modscript.lua
|
||||
|
||||
Папка Server должна содержать подпапки, по одной для каждого серверного мода. Хорошей практикой является наличие только одного основного файла lua и добавление дополнительных файлов lua в подпапки. Однако вам не обязательно это делать, сервер загрузит файлы lua в алфавитном порядке, если их несколько.
|
||||
|
||||
Папка Client содержит zip-файлы, которые отправляются клиенту, который затем загружает их как мод. Любые другие файлы в папке Client вызовут ошибку при запуске сервера, но за исключением этого будут игнорироваться сервером. ModScript.lua будет прочитан BeamNG и укажет игре, какой плагин загружать.
|
||||
|
||||
!!!example "" [Загрузите examplePlugin.zip](../../../../assets/content/ResourcesForExamplePlugin.zip)
|
||||
|
||||
## Серверный lua
|
||||
|
||||
В examplePlugin есть и другие примеры, но вот самый простой, выводящий идентификаторы игроков:
|
||||
|
||||
```lua
|
||||
function onInit() --runs when plugin is loaded
|
||||
|
||||
MP.RegisterEvent("onPlayerAuth", "onPlayerAuth") --Provided by BeamMP
|
||||
|
||||
print("examplePlugin loaded")
|
||||
end
|
||||
|
||||
--A player has authenticated and is requesting to join
|
||||
--The player's name (string), forum role (string), guest account (bool), identifiers (table -> ip, beammp)
|
||||
function onPlayerAuth(player_name, role, isGuest, identifiers)
|
||||
local ip = identifiers.ip
|
||||
local beammp = identifiers.beammp or "N/A"
|
||||
print("onPlayerAuth: player_name: " .. player_name .. " | role: " .. role .. " | isGuest: " .. tostring(isGuest) .. " | identifiers: ip: " .. ip .. " - beammp: " .. beammp)
|
||||
end
|
||||
```
|
||||
|
||||
`onPlayerAuth` срабатывает, как только игрок хочет присоединиться, см. также [onPlayerAuth в справочнике по скриптам](../../../scripting/server/latest-server-reference/#onplayerauth)
|
||||
|
||||
Еще один пример использования onPlayerAuth, но он запретит гостям присоединяться к серверу, отправив клиенту ответное сообщение, которое затем будет показано игроку:
|
||||
|
||||
```lua
|
||||
function onPlayerAuth(playerName, playerRole, isGuest, identifiers)
|
||||
if isGuest then
|
||||
return "No guests allowed, please use a BeamMP account"
|
||||
end
|
||||
end
|
||||
```
|
||||
|
||||
Дополнительную информацию о серверных функциях, предоставляемых BeamMP, можно найти в [последнем справочнике по серверу](../../../scripting/server/latest-server-reference.md)
|
||||
|
||||
## Клиентская часть lua
|
||||
|
||||
Это в значительной степени соответствует [расширениям BeamNG](https://documentation.beamng.com/modding/programming/extensions/)
|
||||
|
||||
```lua
|
||||
local M = {}
|
||||
|
||||
if extensions.isExtensionLoaded("examplePlugin") then
|
||||
log("E", "examplePlugin", "examplePlugin loaded on client side")
|
||||
return
|
||||
end
|
||||
|
||||
return M
|
||||
```
|
||||
|
||||
Выводит на консоль информацию о том, что examplePlugin был загружен
|
||||
|
||||
Более подробную информацию см. в [документации BeamNG по отладочным распечаткам](https://documentation.beamng.com/modding/programming/debugging/#a-add-a-log)
|
||||
|
||||
## modScript.lua
|
||||
|
||||
Обычно содержит только две строки
|
||||
|
||||
```lua
|
||||
load('examplePlugin')
|
||||
setExtensionUnloadMode('examplePlugin', 'manual')
|
||||
```
|
||||
|
||||
Вы можете добавить вывод журнала, если хотите видеть в журналах, когда ваш modScript обрабатывается BeamNG
|
||||
|
||||
```lua
|
||||
load('examplePlugin')
|
||||
setExtensionUnloadMode('examplePlugin', 'manual')
|
||||
log('I', 'modScript', "examplePlugin loaded")
|
||||
```
|
||||
@@ -1,29 +1,36 @@
|
||||
---
|
||||
hide:
|
||||
- navigation
|
||||
- навигация
|
||||
---
|
||||
!!! warning "Этот сайт находится в стадии разработки!"
|
||||
|
||||
Над этим сайтом активно ведется работа.
|
||||
!!! внимание "Этот сайт находится в стадии разработки!"
|
||||
|
||||
Вы считаете, что можете помочь? Пожалуйста, нажмите на страницу с карандашом справа!
|
||||
```
|
||||
Над этим сайтом ведется активная работа.
|
||||
|
||||
Это также можно сделать на любой другой странице.
|
||||
Чувствуете, что можете помочь? Пожалуйста, сделайте это, нажав на страницу с карандашом справа!
|
||||
|
||||
Это можно сделать на любой странице.
|
||||
```
|
||||
|
||||
# Добро пожаловать в BeamMP Docs! :tada:
|
||||
|
||||
Добро пожаловать в новый и улучшенный центр документации для BeamMP! Независимо от того, являетесь ли вы игроком, владельцем сервера или разработчиком, у нас есть все необходимые ресурсы, чтобы улучшить ваш опыт многопользовательской игры в BeamNG.drive.
|
||||
Добро пожаловать в новый и улучшенный центр документации для BeamMP! Независимо от того, являетесь ли вы игроком, владельцем сервера или разработчиком, у нас есть ресурсы, необходимые для улучшения вашего опыта многопользовательской игры BeamNG.drive.
|
||||
|
||||
## Для Игроков
|
||||
## Для игроков
|
||||
|
||||
Новичок в BeamMP? Ознакомьтесь с нашим [Руководством по Началу](../game/getting-started.md), чтобы помочь вам стартовать и получить максимум удовольствия от многопользовательских приключений.
|
||||
Впервые в BeamMP? Ознакомьтесь с нашей страницей [Начало работы](../game/getting-started.md), которая поможет вам быстро начать и получить максимум от игры по сети. По общим вопросам и проблемам, пожалуйста, ознакомьтесь с [Часто задаваемыми вопросами игроков](../FAQ/player-faq.md).
|
||||
|
||||
## Для Владельцев Серверов
|
||||
## Для владельцев серверов
|
||||
|
||||
Хотите создать свой собственный сервер BeamMP? Наше подробное руководство [здесь](../server/create-a-server.md) проведет вас через процесс, обеспечивая вас всеми необходимыми инструментами и знаниями для эффективной настройки сервера.
|
||||
Думаете о создании собственного сервера BeamMP? Наше подробное [руководство](../server/create-a-server.md) проведет вас через весь процесс, гарантируя, что у вас будут все инструменты и знания для эффективной настройки сервера.
|
||||
|
||||
## Для Разработчиков
|
||||
## Для разработчиков
|
||||
|
||||
Узнайте все тонкости создания ресурсов для сервера BeamMP в нашем [Руководстве по Разработке Ресурсов](../guides/mod-creation/server/getting-started.md).
|
||||
Откройте для себя тонкости создания ресурсов для сервера BeamMP в нашем [Руководстве по разработке ресурсов](../guides/mod-creation/server/getting-started.md) .
|
||||
|
||||
Мы готовим для вас захватывающие обновления, включая новую главную страницу, разработанную для улучшения вашего опыта просмотра. Следите за новостями! :slight_smile:
|
||||
На горизонте нас ждут захватывающие обновления, включая совершенно новую домашнюю страницу, разработанную для улучшения вашего опыта просмотра. Оставайтесь с нами, чтобы узнать больше! :slight_smile:
|
||||
|
||||
## Правила Cообщества
|
||||
|
||||
Ознакомьтесь с [Правилами Cообщества](https://docs.beammp.com/community/rules/) BeamMP и узнайте, как обжаловать блокировку.
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
!!! предупреждение "Этот сайт находится в стадии разработки!"
|
||||
|
||||
```
|
||||
This site is being actively worked on.
|
||||
|
||||
Feel you could help? Please do by clicking on the page with a pencil on the right!
|
||||
|
||||
This can be done any page too.
|
||||
```
|
||||
|
||||
# Справочник по Модам/Внутриигровым Скриптам
|
||||
|
||||
BeamMP также позволяет вам создавать собственные плагины на стороне клиента. Мы предоставили несколько функций, которые вы можете использовать для связи с другими многопользовательскими модами и другими игроками через сервер.
|
||||
|
||||
# Функции
|
||||
|
||||
Список доступных функций для написания скриптов:
|
||||
|
||||
Функция | Примечания
|
||||
--- | ---
|
||||
`TriggerServerEvent("eventName", "data")` | Запускает событие в серверной среде lua, оба параметра являются строками.
|
||||
`TriggerClientEvent("eventName", "data")` | Запускает событие в локальной среде lua, оба параметра — строки. Хорошо подходит для связи между плагинами.
|
||||
`AddEventHandler("eventName", Function)` | Добавляет 2-й параметр в таблицу, который будет вызываться при получении `eventName` (локально или с сервера). `Function` получит 1 параметр — строку, содержащую данные события.
|
||||
|
||||
# Фрагменты кода
|
||||
|
||||
Например, для анализа чата используйте включенное событие `ChatMessageIncluded` следующим образом:
|
||||
|
||||
```lua
|
||||
local function chatReceived(msg) -- Receive event with parameters
|
||||
print("chat received: "..msg)
|
||||
local i = string.find(s, ":") -- Find where our first ':' is, used to separate the sender and message
|
||||
if i == nil then
|
||||
print("error parsing message: separator could not be found!")
|
||||
return -- Could not find separator, cancel function
|
||||
end
|
||||
print("index of separator: "..tostring(i))
|
||||
local sender = string.sub(msg, 1, i-1) -- Substring our input to separate its 2 parts
|
||||
local message = string.sub(msg, i+1, -1) -- Do whatever you want to with the message
|
||||
print("sender: " .. sender)
|
||||
print("message: ".. message)
|
||||
end
|
||||
|
||||
AddEventHandler("ChatMessageReceived", chatReceived) -- Add our event handler to the list managed by BeamMP
|
||||
```
|
||||
@@ -0,0 +1,384 @@
|
||||
!!! предупреждение "Этот сайт находится в стадии разработки!"
|
||||
|
||||
```
|
||||
This site is being actively worked on.
|
||||
|
||||
Feel you could help? Please do by clicking on the page with a pencil on the right!
|
||||
|
||||
This can be done any page too.
|
||||
```
|
||||
|
||||
# Справочник по Серверным Скриптам
|
||||
|
||||
## Версия сервера 2.X
|
||||
|
||||
!!! предупреждение
|
||||
|
||||
```
|
||||
BeamMP server version 2.X is now unsupported. This documentation is provided as a reference only.
|
||||
Please update to the latest version for maintenance and support.
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Это скрипт 2.x. Обращайтесь к нему только если ваш сервер старый/устаревший (версия 2.xx). Для получения последней документации см. [здесь](https://docs.beammp.com/scripting/server/latest-server-reference). {.is-warning}
|
||||
|
||||
### Примечания
|
||||
|
||||
Чтобы получить вывод функции в консоли сервера, вам нужно обернуть его в оператор `print()`. Например: `print(GetPlayerName(0))` вернет имя первого игрока вашего сервера.
|
||||
|
||||
`<PlayersServerID>` начинается с 0.
|
||||
|
||||
### Список доступных функций для написания скриптов
|
||||
|
||||
#### GetPlayerName(playersServerID)
|
||||
|
||||
Возвращает имя игрока в Discord в виде строки
|
||||
|
||||
```lua
|
||||
function onPlayerJoin(playerID)
|
||||
local name = GetPlayerName(playerID)
|
||||
-- Do something
|
||||
end
|
||||
```
|
||||
|
||||
#### GetPlayerDiscordID(playersServerID)
|
||||
|
||||
Возвращает имя игрока в Discord в виде строки
|
||||
|
||||
```lua
|
||||
function onPlayerJoin(playerID)
|
||||
local name = GetPlayerDiscordID(playerID)
|
||||
-- Do something
|
||||
end
|
||||
```
|
||||
|
||||
#### GetPlayerHWID(playersServerID)
|
||||
|
||||
Возвращает идентификатор игрока в Discord в виде строки
|
||||
|
||||
```lua
|
||||
function onPlayerJoin(playerID)
|
||||
local name = GetPlayerHWID(playerID)
|
||||
-- Do something
|
||||
end
|
||||
```
|
||||
|
||||
#### GetPlayerVehicles(playersServerID)
|
||||
|
||||
Возвращает транспортные средства игрока в виде объекта/массива.
|
||||
|
||||
```lua
|
||||
function onChatMessage(playerID, senderName, message)
|
||||
local vehicleList = GetPlayerVehicles(playerID)
|
||||
for vehicleID, vehicleData in pairs(vehicleList) do
|
||||
-- Do something
|
||||
-- Could also be used to check how many vehicles a player have
|
||||
end
|
||||
end
|
||||
```
|
||||
|
||||
#### DropPlayer(playersServerID)
|
||||
|
||||
Сбрасывает соединение для определенного игрока. По сути выгоняет его
|
||||
|
||||
```lua
|
||||
function onVehicleSpawn(playerID, vehicleID, vehicleData)
|
||||
-- Do something
|
||||
DropPlayer(playerID)
|
||||
end
|
||||
```
|
||||
|
||||
#### SendChatMessage(playersServerID, сообщение)
|
||||
|
||||
Отправляет сообщение по сети указанному пользователю. Используйте -1 для всех
|
||||
|
||||
```lua
|
||||
function onPlayerJoin(playerID)
|
||||
SendChatMessage(-1, "Someone just joined!")
|
||||
end
|
||||
```
|
||||
|
||||
#### CancelEvent() -- УСТАРЕЛО
|
||||
|
||||
Отменяет событие. Это может произойти скоро. Используйте `return 1` чтобы отменить событие.
|
||||
|
||||
#### onInit()
|
||||
|
||||
Если объявлено в файле lua, оно будет вызвано после того, как C++ успешно завершит загрузку текущего файла lua.
|
||||
|
||||
```lua
|
||||
function onInit()
|
||||
print("Server ready")
|
||||
end
|
||||
```
|
||||
|
||||
#### exit()
|
||||
|
||||
Закроет сервер
|
||||
|
||||
```lua
|
||||
function onInit()
|
||||
print("Server Ready. But who needs a server which is running")
|
||||
exit() -- Stops the server
|
||||
end
|
||||
```
|
||||
|
||||
#### CreateThread(functionName, callInterval)
|
||||
|
||||
Функция будет выполняться в выделенном потоке, и она будет запускать callInterval раз в секунду. 1 = Она будет запускаться каждую секунду.
|
||||
|
||||
```lua
|
||||
function yourFunction()
|
||||
for i = 1,10 do
|
||||
SendChatMessage(-1, "Countdown: "..i)
|
||||
Sleep(1000)
|
||||
end
|
||||
end
|
||||
CreateThread("yourFunction", 30)
|
||||
```
|
||||
|
||||
УСТАРЕВШИЙ ПРИМЕР Функция будет выполняться в выделенном потоке
|
||||
|
||||
```lua
|
||||
function yourFunction()
|
||||
for i = 1,10 do
|
||||
SendChatMessage(-1, "Countdown: "..i)
|
||||
Sleep(1000)
|
||||
end
|
||||
end
|
||||
CreateThread("yourFunction", 30)
|
||||
```
|
||||
|
||||
#### StopThread(functionName)
|
||||
|
||||
Прекратит попытки вызвать функцию потока текущего скрипта.
|
||||
|
||||
```lua
|
||||
function yourFunction()
|
||||
delayExpired = false
|
||||
Sleep(10000)
|
||||
delayExpired = true
|
||||
end
|
||||
CreateThread("yourFunction", 30)
|
||||
-- Do something
|
||||
if not delayExpired then
|
||||
StopThread("yourFunction")
|
||||
else
|
||||
-- Do something
|
||||
end
|
||||
|
||||
```
|
||||
|
||||
#### Sleep(миллисек) - УСТАРЕЛО
|
||||
|
||||
Приостановит выполнение на указанное время (предупреждение: это приведет к приостановке всего сервера, если вы не создали поток)
|
||||
|
||||
```lua
|
||||
function countdown()
|
||||
for i = 1,10 do
|
||||
SendChatMessage(-1, "Countdown: "..i)
|
||||
Sleep(1000)
|
||||
end
|
||||
end
|
||||
CreateThread("countdown", 10)
|
||||
```
|
||||
|
||||
#### GetPlayerCount()
|
||||
|
||||
Вернет количество подключенных игроков
|
||||
|
||||
```lua
|
||||
function onPlayerJoin(playerID)
|
||||
SendChatMessage(playerID, "You are the "..GetPlayerCount().."th player!"
|
||||
end
|
||||
```
|
||||
|
||||
#### RemoveVehicle(playerServerID, VehicleID)
|
||||
|
||||
Деспавнит транспортное средство
|
||||
|
||||
```lua
|
||||
function onVehicleSpawn(playerID, vehicleID, vehicleData)
|
||||
if --[[ Vehicle data equal something it shouldn't be ]] then
|
||||
RemoveVehicle(playerID, vehicleIID)
|
||||
end
|
||||
end
|
||||
```
|
||||
|
||||
#### GetPlayers()
|
||||
|
||||
Вернет таблицу идентификаторов с именами
|
||||
|
||||
```lua
|
||||
local function onPlayerJoin(joinedPlayerID)
|
||||
local players = GetPlayers()
|
||||
for playerID, playerName in pairs(players) do
|
||||
if playerID == joinedPlayerID then
|
||||
-- Do something
|
||||
end
|
||||
end
|
||||
end
|
||||
```
|
||||
|
||||
#### RegisterEvent(eventName, functionName)
|
||||
|
||||
Зарегистрирует эту функцию в указанном событии. Оба варианта должны быть строками
|
||||
|
||||
```lua
|
||||
function anyEvent()
|
||||
-- Do something
|
||||
end
|
||||
RegisterEvent("onAnyEventHappen", "anyEvent")
|
||||
-- Do something
|
||||
TriggerLocalEvent("onAnyEventHappen")
|
||||
```
|
||||
|
||||
#### TriggerLocalEvent(eventName)
|
||||
|
||||
Будет вызывать каждую зарегистрированную функцию в той же папке плагина.
|
||||
|
||||
```lua
|
||||
function anyEvent()
|
||||
-- Do something
|
||||
end
|
||||
RegisterEvent("onAnyEventHappen", "anyEvent")
|
||||
-- Do something
|
||||
TriggerLocalEvent("onAnyEventHappen")
|
||||
```
|
||||
|
||||
#### TriggerGlobalEvent(eventName)
|
||||
|
||||
Будет вызывать каждую зарегистрированную функцию с этим именем события.
|
||||
|
||||
```lua
|
||||
-- File A
|
||||
function anyEvent()
|
||||
-- Do something
|
||||
end
|
||||
RegisterEvent("onAnyEventHappen", "anyEvent")
|
||||
```
|
||||
|
||||
```lua
|
||||
-- File B
|
||||
TriggerGlobalEvent("onAnyEventHappen")
|
||||
```
|
||||
|
||||
#### TriggerClientEvent(playerServerID, eventName, data)
|
||||
|
||||
Вызовет это событие с указанными данными на указанном клиенте (-1 для широковещательной передачи)
|
||||
|
||||
```lua
|
||||
function onPlayerJoin(playerServerID)
|
||||
TriggerClientEvent(playerServerID, "anyEvent", "You just joined the server")
|
||||
end
|
||||
RegisterEvent("onAnyEventHappen", "anyEvent")
|
||||
```
|
||||
|
||||
#### Set(configID, newValue)
|
||||
|
||||
установит настройку конфигурации на новое указанное значение из таблицы ниже|
|
||||
|
||||
```lua
|
||||
function onChatMessage(playerID, senderName, message)
|
||||
if playerID == adminPlayer then
|
||||
if message == --[[ anything ]] then
|
||||
Set(3, 10)
|
||||
end
|
||||
end
|
||||
end
|
||||
```
|
||||
|
||||
#### Список доступных настроек конфигурации для команды `Set()`
|
||||
|
||||
> Обратите внимание, что они не будут сохранены в файле конфигурации.
|
||||
|
||||
Идентификатор конфигурации | Имя | Примет только
|
||||
--- | --- | ---
|
||||
`0` | Настройка отладки | правда или ложь
|
||||
`1` | Настройка приватности | правда или ложь
|
||||
`2` | Макс. количество автомобилей на игрока | число
|
||||
`3` | Макс. количество игроков | число
|
||||
`4` | Карта | нить
|
||||
`5` | Имя | нить
|
||||
`6` | Описание | нить
|
||||
любой другой идентификатор приведет к появлению предупреждения на консоли | |
|
||||
|
||||
### Список доступных событий для написания сценариев
|
||||
|
||||
#### События по Умолчанию
|
||||
|
||||
Пример использования события:
|
||||
|
||||
```lua
|
||||
function onInit()
|
||||
RegisterEvent("onPlayerJoin", "onPlayerJoin")
|
||||
end
|
||||
|
||||
function onPlayerJoin(playerServerID)
|
||||
-- Do something
|
||||
end
|
||||
```
|
||||
|
||||
Если вы не хотите, чтобы на вашем сервере были гости:
|
||||
|
||||
```lua
|
||||
function onInit()
|
||||
print("noGuests Ready")
|
||||
RegisterEvent("onPlayerAuth","onPlayerAuth")
|
||||
end
|
||||
|
||||
function onPlayerAuth(name, role, isGuest)
|
||||
if isGuest then
|
||||
return "You must be signed in to join this server!"
|
||||
end
|
||||
end
|
||||
```
|
||||
|
||||
Событие | Параметры | Описание
|
||||
--- | --- | ---
|
||||
`onPlayerAuth` | Имя игрока, роль на форуме, гостевая учетная запись (bool) | Игрок прошел аутентификацию и запрашивает присоединение
|
||||
`onPlayerConnecting` | Идентификатор игрока | Игрок загружается (до загрузки карты)
|
||||
`onPlayerJoining` | Идентификатор игрока | Игрок загружает карту и скоро присоединится
|
||||
`onPlayerJoin` | Идентификатор игрока | Игрок присоединился и загрузился
|
||||
`onPlayerDisconnect` | Идентификатор игрока | Игрок отключился
|
||||
`onChatMessage` | Идентификатор отправителя, имя и сообщение чата | Сообщение чата было отправлено. Это было бы хорошо для создания системы команд
|
||||
`onVehicleSpawn` | Идентификатор игрока, идентификатор транспортного средства и данные транспортного средства | Это вызывается, когда кто-то создает транспортное средство
|
||||
`onVehicleEdited` | Идентификатор игрока, идентификатор транспортного средства и данные транспортного средства | Это происходит, когда кто-то редактирует транспортное средство или заменяет существующее
|
||||
`onVehicleDeleted` | Идентификатор игрока и идентификатор транспортного средства | Это происходит, когда кто-то удаляет принадлежащее ему транспортное средство
|
||||
|
||||
#### Пользовательские События
|
||||
|
||||
Пользовательские события также могут быть созданы для вашего собственного использования. Это делается примерно так же, как и события по умолчанию.
|
||||
|
||||
Пример использования пользовательского события:
|
||||
|
||||
```lua
|
||||
function onInit()
|
||||
RegisterEvent("myCustomEvent", "myCustomEvent")
|
||||
end
|
||||
|
||||
function myCustomEvent(playerServerID, customData)
|
||||
-- Do something
|
||||
end
|
||||
```
|
||||
|
||||
Затем его можно вызвать либо со стороны клиента, либо со стороны сервера, используя соответствующие функции.
|
||||
|
||||
### Игроки
|
||||
|
||||
Когда игрок подключается к вашему серверу, ему назначается serverID, начиная с 0 и далее. serverID используются повторно; если игрок покидает сервер и снова присоединяется, ему не будет назначен новый serverID, он просто получит другой доступный. Когда сервер перезапустится, serverID будут сброшены.
|
||||
|
||||
#### Статические идентификаторы
|
||||
|
||||
У игроков в BeamMP есть 3 статических идентификатора, которые можно получить из их serverID: имя, discordID и hardwareID или HWID. (Хотя последний из вышеупомянутых не реализован, мы будем действовать так, как будто он реализован). Каждый из трех типов идентификаторов имеет свое собственное происхождение и сильные/слабые стороны при использовании их для идентификации игрока.
|
||||
|
||||
ТИП ИДЕНТИФИКАТОРА | ПЛЮСЫ | МИНУСЫ | ФУНКЦИЯ ДЛЯ ПОЛУЧЕНИЯ
|
||||
--- | --- | --- | :-:
|
||||
имя | легко получить, просто | не безопасно | GetPlayerName()
|
||||
DiscordID | довольно безопасно | неудобно | GetPlayerDiscordID()
|
||||
HWID | чрезвычайно безопасно | трудно получить | GetPlayerHWID()
|
||||
|
||||
### Транспортные средства
|
||||
|
||||
У транспортных средств в beamMP есть 3 атрибута, на которые обращает внимание сервер: serverID владельца, vehicleID транспортного средства и его данные. ServerID владельца прост, это serverID, у каждого транспортного средства также есть ID, идентификаторы транспортных средств не уникальны для транспортного средства; два транспортных средства могут иметь одинаковый ID, если они принадлежат разным владельцам. В отличие от serverID, vehicleID используются повторно, например, если у меня есть 4 транспортных средства, их идентификаторы — 0, 1, 2 и 3, если я удалю транспортное средство в vehicleID 2, у меня будут 0, 1 и 3, когда я создам новое транспортное средство, новое транспортное средство будет помещено в слот ID 2. Наконец, последний атрибут, который есть у транспортных средств, — это data, data содержит транспортное средство, название, детали и другие данные; как следует из названия. data хранится в виде необработанной строки JSON, поэтому вам понадобится библиотека JSON. В качестве альтернативы вы можете вручную пройти по строке и извлечь необходимую информацию.
|
||||
@@ -0,0 +1,295 @@
|
||||
# Установка Сервера
|
||||
|
||||
## **Создание Сервера**
|
||||
|
||||
Основы настройки серверного приложения
|
||||
|
||||
---
|
||||
|
||||
### **Обзор**
|
||||
|
||||
**Создание домашнего сервера бесплатно, размещение его на VPS проще и безопаснее**
|
||||
|
||||
Серверы являются неотъемлемой частью BeamMP; игроки подключаются друг к другу через сервер. Они работают нативно на Windows и Linux.
|
||||
|
||||
Вы можете создавать частные серверы, к которым смогут присоединиться только приглашенные вами люди, или публичные серверы, которые будут отображаться в нашем официальном списке серверов.
|
||||
|
||||
Запуск сервера — это процесс из нескольких шагов! Если у вас возникнут какие-либо проблемы, смело задавайте их на нашем [форуме](https://forum.beammp.com) или на нашем [сервере Discord](https://discord.gg/beammp) в канале `#support`. Также обратитесь к разделу [«Обслуживание сервера»](server-maintenance.md) для получения дополнительной информации.
|
||||
|
||||
Перед использованием обязательно прочтите [ЛИЦЕНЗИЮ](https://raw.githubusercontent.com/BeamMP/BeamMP-Server/master/LICENSE) сервера.
|
||||
|
||||
Примечание: *сервер поддерживает только IPv4. Если вы не знаете, какой у вас IPv4, посмотрите на IP-адрес, который вы видите на [*whatsmyip.org*](https://www.whatsmyip.org/) — если он содержит* двоеточия `_:_` *, это **IPv6**. В этом случае вам следует дополнительно выяснить, есть ли у вас IPv4. Вы можете позвонить своему интернет-провайдеру, чтобы узнать это, или спросить кого-то, кто живет с вами (если они разбираются в технологиях, они могут знать!). Поддержка IPv6 планируется.*
|
||||
|
||||
## Настройка Сервера
|
||||
|
||||
Настройка состоит из следующих шагов, вам следует выполнить их все.
|
||||
|
||||
### **1. Переадресация портов**
|
||||
|
||||
!!! информация
|
||||
|
||||
```
|
||||
Если вы используете VPS (виртуальный частный сервер), корневой сервер или планируете разместить этот сервер локально (с игроками в одном доме с вами), вы можете пропустить этот шаг.
|
||||
Этот шаг необходим, если вы хотите, чтобы кто-то **вне** вашего домохозяйства присоединился к вашему домашнему серверу (за пределами вашей локальной сети).
|
||||
|
||||
!!! опасность ":material-scale-balance: ОТКАЗ ОТ ОТВЕТСТВЕННОСТИ:"
|
||||
|
||||
**Переадресация портов — это риск**.
|
||||
|
||||
Переадресуя порты, вы осознаете риски открытия портов в вашей домашней сети для публики и, следовательно, лишаете себя права привлекать BeamMP к ответственности за **любой** ущерб, который может быть причинен вам или вашему домохозяйству.
|
||||
|
||||
Мы не несем ответственности за какой-либо контент на любых внешних связанных сервисах или веб-сайтах.
|
||||
|
||||
Поэтому рекомендуется разместить сервер на одном из наших партнерских сервисов!
|
||||
|
||||
*Пожалуйста, ознакомьтесь с [этим руководством по переадресации портов](port-forwarding.md)*
|
||||
```
|
||||
|
||||
#### Партнерские услуги хостинга (платные):
|
||||
|
||||
- [Хостинг Горизонта](https://hrzn.link/beammp)
|
||||
- [RackGenius](https://rackgeni.us/beammp-plans)
|
||||
- [Подключить хостинг](https://connecthosting.net/beammp)
|
||||
- [Хостинг Assetto](https://assettohosting.com/en/games/beamng)
|
||||
- [ZAP-Хостинг](https://zap-hosting.com/itsbeammp)
|
||||
- [HostHavoc](https://hosthavoc.com/)
|
||||
- [PedalHost](https://pedal.host/)
|
||||
- [Хостинг Vyper](https://vyperhosting.com/r/beammp)
|
||||
- [BisectHosting](https://www.bisecthosting.com/beammp-server-hosting)
|
||||
- [Хостинг Four Seasons](https://fourseasonshosting.com)
|
||||
- [Vertuo Хостинг](https://vertuohosting.com)
|
||||
- [Винхеберг](https://winheberg.fr/offres/gaming/beammp?lang=en)
|
||||
- [Ваббанод](https://wabbanode.com/partner/beammp)
|
||||
- [Айcлайн Хостинг](https://iceline-hosting.com/games/beammp)
|
||||
|
||||
#### 1.1 Брандмауэр
|
||||
|
||||
В зависимости от настроек вам может потребоваться разрешить BeamMP-Server проходить через ваш брандмауэр. Это касается Windows (отключение брандмауэра обычно **не** работает) и многих предустановленных серверов Linux.
|
||||
|
||||
Там вы хотите разрешить BeamMP-Server через брандмауэр, **как входящие, так и исходящие соединения**, и **как TCP, так и UDP**. Если ваш брандмауэр запрашивает порт вместо этого, это должен быть тот же порт, который вы использовали на шаге «1. Переадресация портов» (обычно 30814).
|
||||
|
||||
Для более детализированного руководства, обратитесь к [этой странице документации](https://docs.beammp.com/FAQ/Defender-exclusions/). Если у вас остались проблемы, вы можете спросить о них на [Форуме](https://forum.beammp.com) или нашем [Discord сервере](https://discord.gg/beammp) в `#support` канале.
|
||||
|
||||
### **2. Получение ключа аутентификации**
|
||||
|
||||
«Ключ аутентификации», часто называемый «AuthKey», необходим для того, чтобы сделать **общедоступный** сервер доступным для списка серверов. Хотя рекомендуется добавлять authkey и к частным серверам. У вас есть ограниченное количество ключей. Один ключ может использоваться на одном сервере одновременно, поэтому вы не можете запустить два сервера одновременно с одним и тем же ключом. Дополнительные ключи можно получить, поддержав проект. Прочитайте [эту статью](https://docs.beammp.com/support/player-faq/) для получения дополнительной информации.
|
||||
|
||||
!!! предупреждение
|
||||
|
||||
```
|
||||
НИКОГДА НЕ ДЕЛИТЕСЬ ЭТИМ КЛЮЧОМ И НЕ ПОКАЗЫВАЙТЕ ЕГО НИКОМУ. ОТНОСИТЕСЬ К НЕМУ КАК К ПАРОЛЮ.
|
||||
```
|
||||
|
||||
Для этого шага вам понадобится учетная запись [Discord](https://discord.com). Это необходимо для предотвращения спама.
|
||||
|
||||
#### 2.1. Доступ к странице ключей
|
||||
|
||||
Войдите в [Keymaster](https://beammp.com/keymaster) через Discord. На домашней странице Keymaster нажмите «Ключи» в левой части экрана:
|
||||
|
||||
|
||||
<figure markdown=""></figure>
|
||||
|
||||
#### 2.2 Создание ключа
|
||||
|
||||
Чтобы создать свой ключ, нажмите на зеленую кнопку «+» в правом верхнем углу.
|
||||
|
||||
|
||||
<figure markdown=""></figure>
|
||||
|
||||
#### 2.3. Заполнение ключевой информации
|
||||
|
||||
Далее заполните поле Имя сервера (это просто имя ключа, а не фактическое имя сервера в списке), затем нажмите «Создать». Пример:
|
||||
|
||||
|
||||
<figure class="image image_resized" style="width:44.84%;" markdown=""></figure>
|
||||
|
||||
В конечном итоге это должно выглядеть примерно так:
|
||||
|
||||
|
||||
<figure markdown=""></figure>
|
||||
|
||||
#### 2.4 Копирование ключа
|
||||
|
||||
Теперь скопируйте текст в поле «Ключ», в этом примере это `3173a2e-6az0-4542-a3p0-ddqq5ff95558` и сохраните его для следующего шага. Вы можете сделать это, щелкнув по буферу обмена справа от ключа:
|
||||
|
||||
|
||||
<figure markdown=""></figure>
|
||||
|
||||
### **3. Установка**
|
||||
|
||||
BeamMP-Server доступен для Windows и Linux. Следующие два раздела посвящены Windows и Linux.
|
||||
|
||||
#### 3.а. Установка на Windows
|
||||
|
||||
Для установки Linux см. следующий шаг.
|
||||
|
||||
Пожалуйста, убедитесь, что у вас перенаправлены порты, прежде чем пытаться разместить сервер дома! Без перенаправления портов вы не сможете разместить сервер для общественности!
|
||||
|
||||
1. Для запуска сервера убедитесь, что у вас установлены [Visual C++ Redistributables](https://aka.ms/vs/17/release/vc_redist.x64.exe).
|
||||
2. Загрузите исполняемый файл сервера с [beammp.com](https://www.beammp.com/). У вас должен получиться исполняемый файл, который называется примерно так: `BeamMP-Server.exe`.
|
||||
3. После загрузки создайте где-нибудь папку и поместите туда `BeamMP-Server.exe`. Это то место, где будет находиться ваш сервер.
|
||||
4. Запустите сервер один раз, дважды щелкнув по нему. Это сгенерирует все необходимые файлы для вас, как только вы увидите текст, вы можете закрыть его и перейти к следующему шагу. Вы должны увидеть файл `ServerConfig.toml` рядом с вашим `BeamMP-Server.exe`.
|
||||
5. (необязательно) Для быстрого доступа в будущем вы можете легко создать ярлык на рабочем столе для `BeamMP-Server.exe` используя **[Щелкните правой кнопкой мыши]** > **Отправить на** > **Рабочий стол (создать ярлык).**
|
||||
|
||||
Теперь перейдите к шагу [4. Конфигурация](#4-configuration).
|
||||
|
||||
#### 3.б. Установка на Linux
|
||||
|
||||
##### Использование нашей сборки (рекомендуется)
|
||||
|
||||
Этот шаг будет работать на всех дистрибутивах, для которых мы предоставляем [здесь](https://github.com/BeamMP/BeamMP-Server/releases/latest) файлы. Если у вас другой дистрибутив или архитектура, обратитесь к шагу «Сборка из исходного кода» ниже.
|
||||
|
||||
1. Убедитесь, что у вас установлены зависимости, перечисленные [здесь](https://github.com/BeamMP/BeamMP-Server#runtime-dependencies).
|
||||
2. Перейдите на сайт [beammp.com](https://beammp.com/) и нажмите кнопку «Загрузить сервер», вы будете перенаправлены на страницу релиза сервера на GitHub.
|
||||
3. Загрузите правильную версию для вашего дистрибутива. Для простоты с этого момента она будет называться `BeamMP-Server-xxx`, где `xxx` обозначает версию для используемого вами дистрибутива.
|
||||
4. После загрузки вы должны увидеть один файл с именем `BeamMP-Server-xxx`, среди прочих, которые вы можете пока проигнорировать. Создайте где-нибудь папку и поместите туда `BeamMP-Server-xxx`. Это то место, где будет находиться ваш сервер.
|
||||
5. Откройте терминал, перейдите в папку, в которую вы поместили `BeamMP-Server-xxx`, и выполните `chmod +x BeamMP-Server-xxx`. Это гарантирует, что у вас есть разрешения на его запуск.
|
||||
6. Запустите сервер один раз, запустив его с помощью `./BeamMP-Server-xxx`. Это сгенерирует все необходимые файлы для вас, как только вы увидите текст, вы можете закрыть его и перейти к следующему шагу. Вы должны увидеть файл `ServerConfig.toml` рядом с вашим `BeamMP-Server-xxx`.
|
||||
7. (необязательно) Настоятельно рекомендуется настроить пользователя с именем `beammpserver` (или похожим), поскольку мы НЕ рекомендуем запускать сервер как root, sudo или с вашей личной учетной записью пользователя. Затем вам следует предпринять шаги, чтобы убедиться, что вы запускаете сервер только как этот пользователь.
|
||||
|
||||
Теперь перейдите к шагу «4. Конфигурация».
|
||||
|
||||
##### Сборка из источника
|
||||
|
||||
Другие дистрибутивы в дополнение к тем, которые уже имеют [здесь](https://github.com/BeamMP/BeamMP-Server/releases/latest) двоичный файл, вероятно, тоже будут работать, но официально не поддерживаются. Если вы хотите собрать его самостоятельно, вы можете сделать это, загрузив исходный код на нашем [GitHub](https://github.com/BeamMP/BeamMP-Server), руководство можно найти [здесь](https://github.com/BeamMP/BeamMP-Server#build-instructions).
|
||||
|
||||
В конце обязательно запустите свой сервер один раз с помощью `./BeamMP-Server`, а затем переходите к следующему шагу.
|
||||
|
||||
### **4. Конфигурация**
|
||||
|
||||
Теперь, когда вы запустили сервер один раз, он должен был создать некоторые файлы и, вероятно, выдать одну или две ошибки. Это потому, что мы еще не закончили. В вашей папке должны быть эти файлы:
|
||||
|
||||
|
||||
<figure markdown=""></figure>
|
||||
|
||||
Они называются «ServerConfig.toml», «Server.log» и «BeamMP-Server.exe»! (В зависимости от ваших настроек вы можете не увидеть расширения [.toml] [.log] [.exe])
|
||||
|
||||
Откройте `ServerConfig.toml` с помощью текстового редактора, например `Notepad`. Это можно сделать с помощью [Правый клик] → «Открыть с помощью…» и выбора текстового редактора.
|
||||
|
||||
Вот пример конфигурации:
|
||||
|
||||
```TOML
|
||||
[General]
|
||||
Port = 30814
|
||||
AuthKey = "auth-key"
|
||||
AllowGuests = false
|
||||
LogChat = false
|
||||
Debug = false
|
||||
IP = "::"
|
||||
Private = true
|
||||
InformationPacket = true
|
||||
Name = "Test Server"
|
||||
Tags = "Freeroam,Modded,Racing,Police"
|
||||
MaxCars = 2
|
||||
MaxPlayers = 10
|
||||
Map = "/levels/ks_nord/info.json"
|
||||
Description = "Total Random Beam MP Server"
|
||||
ResourceFolder = "Resources"
|
||||
```
|
||||
|
||||
!!! информация
|
||||
|
||||
```
|
||||
Это ваш файл конфигурации. Он использует формат TOML. Дополнительную информацию об этом файле и переменных см. в разделе [Обслуживание сервера](server-maintenance.md).
|
||||
Ваш сервер **НЕ** будет отображаться в списке серверов, пока установлено значение `Private = true`. _Если_ вы хотите, чтобы он отображался в списке, установите значение **`Private = false`**.
|
||||
```
|
||||
|
||||
Пока что нас интересует только поле `AuthKey`. В кавычки `"` нужно вставить свой AuthKey, скопированный на первом шаге.
|
||||
|
||||
Для нашего примера ключ должен выглядеть следующим образом:
|
||||
|
||||
```TOML
|
||||
AuthKey = '3173a2e-6az0-4542-a3p0-ddqq5ff95558'
|
||||
```
|
||||
|
||||
Присвойте своему серверу имя в поле `Name`. Вы можете форматировать его с помощью цветов и других средств; подробности см. в [этом разделе о настройке имени](server-maintenance.md#customize-the-look-of-your-server-name) на странице обслуживания сервера.
|
||||
|
||||
Если вы выбрали другой **порт**, отличный от **30814**, обязательно замените его здесь в разделе `Port`.
|
||||
|
||||
### **5. Проверка**
|
||||
|
||||
Теперь снова запустите сервер и посмотрите, выдает ли он еще сообщения `[ERROR]` или `[WARN]`. Теперь сервер должен оставаться открытым. В следующих шагах (6.) ниже вы можете узнать, как присоединиться к серверу.
|
||||
|
||||
---
|
||||
|
||||
#### 5.1 Как добавить моды на свой сервер
|
||||
|
||||
Моды транспортных средств и моды карт устанавливаются по-разному, но оба требуют, чтобы вы поместили их в папку вашего сервера (`Resources/Client`). Просто перетащите любой мод, который вы хотите добавить, в эту папку.
|
||||
|
||||
!!! предупреждение
|
||||
|
||||
```
|
||||
Если вы получили сообщение «Готово» или «Начало» при попытке присоединиться к серверу после добавления модов, скорее всего, вы добавили на сервер несовместимый или сломанный мод.
|
||||
Несовместимость модов может также возникнуть между 2 или более модами. Если у вас установлены клиентские моды, проверьте [это руководство](../../FAQ/How-to-deactivate-mods.md) об удалении модов из вашей игры.
|
||||
```
|
||||
|
||||
#### 5.2 Общие моды
|
||||
|
||||
Если вы хотите добавить только модифицированные транспортные средства, вы можете поместить zip-файл мода в папку `Resources/Client`. Они будут автоматически загружены любым, кто присоединится к вашему серверу.
|
||||
|
||||
#### 5.3 Карты
|
||||
|
||||
Все стандартные карты (карты, которые не являются модами) работают сразу «из коробки» и не требуют установки. Вам нужно лишь изменить параметр `Map` в файле `ServerConfig.toml` на любое из [этих](server-maintenance.md#all-vanilla-maps-names). Для любых других, модифицированных карт, сделайте следующее:
|
||||
|
||||
1. Поместите `.zip`-файл вашей карты в папку вашего сервера (`Resources/Client`).
|
||||
2. Далее, загляните в zip-файл карты (не извлекайте его) и откройте папку `levels`. В этой папке должна быть просто еще одна папка с названием карты, например, «myawesomedriftmap2021». Обязательно скопируйте или запомните это название *точно так, как оно написано в названии этой папки.*
|
||||
3. Откройте `ServerConfig.toml`. В настройках `Map` вы должны увидеть `/levels/MAPNAME/info.json`, где `MAPNAME`, скорее всего, что-то вроде `gridmap_v2`. Теперь вам нужно заменить `MAPNAME` на имя папки из последнего шага, в том примере это было `myawesomedriftmap2021`. В итоге это должно выглядеть так (для этого примера) и ***должно*** иметь `/info.json` в конце.
|
||||
|
||||
```TOML
|
||||
Map = '/levels/myawesomedriftmap2021/info.json'
|
||||
```
|
||||
|
||||
Теперь, когда кто-то присоединится к вашему серверу, он должен автоматически загрузить карту и работать так, как и ожидалось.
|
||||
|
||||
**Если это НЕ работает**, установите карту в одиночную игру BeamNG.drive, запустите ее и войдите в карту. Затем откройте консоль, нажав клавишу `~` (*тильда*) (если у вас не американская раскладка клавиатуры, посмотрите на действие **Toggle System Console** в меню **Options > Controls > Bindings** в разделе **General Debug**), и запустите `print(getMissionFilename())`. Это должно показать вам имя для использования.
|
||||
|
||||
Вот и все! Ваша модифицированная карта теперь должна быть доступна для присоединения!
|
||||
|
||||
### **6. Как присоединиться к вашему серверу**
|
||||
|
||||
Как вы и другие игроки можете присоединиться к вашему серверу.
|
||||
|
||||
#### 6.a. Присоединение к собственному серверу (как частному, так и публичному)
|
||||
|
||||
Если ваш сервер размещен на том же ПК, на котором работает игра, вы должны присоединиться к серверу с помощью прямого подключения, для этого нажмите **вкладку Direct Connect** слева от списка серверов. Оставьте там информацию по умолчанию (должно быть 127.0.0.1 и соответствующий порт), затем нажмите Connect.
|
||||
|
||||
Если ваш сервер размещен на другом ПК в вашей локальной сети, вам необходимо найти локальный IP-адрес этой машины и напрямую подключиться, используя этот локальный IP-адрес.
|
||||
|
||||
Если ваш сервер размещен за пределами вашего дома (например, VPS), вам необходимо найти [публичный IP-адрес](https://whatismyipaddress.com/) этой машины и подключиться напрямую через него.
|
||||
|
||||
#### 6.б. Присоединение других людей к вашему приватному серверу
|
||||
|
||||
Вам необходимо предоставить другим пользователям публичный IP-адрес вашего сервера. Однако будьте осторожны, сообщая свой публичный IP-адрес незнакомцам! Чтобы присоединиться к вашему частному серверу, игроки должны перейти на **вкладку Direct Connect** в BeamMP, затем ввести свой IP и порт.
|
||||
|
||||
#### 6.c. Присоединение других людей к вашему публичному серверу
|
||||
|
||||
Чтобы присоединиться к вашему публичному серверу, они могут просто перейти к списку серверов, ввести имя сервера и нажать «подключиться». Если вы не уверены в имени своего сервера, это будет имя, которое вы указали в `ServerConfig.toml`. Убедитесь, что фильтры поиска отключены, а Карта установлена на «Любая», если вы не можете ее найти. Вы также можете проверить веб-сайт [Keymaster](https://beammp.com/keymaster) на предмет IP-адреса сервера.
|
||||
|
||||
Если вы или ваши друзья столкнулись с ошибкой «Сбой подключения!», проверьте окно запуска на наличие кодов вроде 10060, 10061, 10030. Это означает, что у вас либо есть CGNAT IPv4, либо вы сделали что-то неправильно на шаге **1 Переадресация портов** или **1.1. Межсетевой экран**. Чтобы проверить, есть ли у вас CGNAT IPv4, найдите WAN IP-адрес на интерфейсе маршрутизатора. Сравните его с вашим [публичным IP-адресом](https://www.whatsmyip.org/). Если они одинаковы, вы не находитесь за CGNAT. Поддержка IPv6 пока **НЕ** реализована.
|
||||
|
||||
### **7. Как проверить подключение вашего сервера BeamMP**
|
||||
|
||||
Введите публичный IPv4-адрес и порт сервера ниже, затем нажмите «CheckBeamMP».
|
||||
|
||||
<form action="https://check.beammp.com/api/v2/beammp" method="get" target="_blank">
|
||||
<label for="ip">IP-адрес:</label>
|
||||
<input type="text" id="ip" name="ip"><br>
|
||||
<label for="port">Порт:</label>
|
||||
<input type="text" id="port" name="port"><br>
|
||||
<input type="submit" value="CheckBeamMP">
|
||||
</form>
|
||||
|
||||
!!! предупреждение «Я хочу использовать VPN, например RadminVPN, Hamachi или аналогичный».
|
||||
|
||||
```
|
||||
BeamMP не поддерживает эти VPN, так как они часто вызывают проблемы. Одна из этих проблем — непереадресация трафика UDP. Чтобы решить эту проблему, обратитесь к разделу 1.
|
||||
|
||||
!!! вопрос «Но почему это работало в прошлом?»
|
||||
|
||||
Это происходит из-за того, что разработчики этих приложений обновляют свое программное обеспечение и вносят изменения, которые BeamMP не контролирует.
|
||||
Разработчики этих приложений должны обеспечить поддержку конкретных вариантов использования, таких как BeamMP-Server.
|
||||
```
|
||||
|
||||
## Все еще сталкиваетесь с проблемами?
|
||||
|
||||
Откройте тему на [форуме](https://forum.beammp.com) или на нашем [сервере Discord](https://discord.gg/beammp) в канале `#support`.
|
||||
@@ -0,0 +1,20 @@
|
||||
# Коды Ошибок
|
||||
|
||||
На этой странице содержатся все коды ошибок, которые может отображать сервер.
|
||||
|
||||
---
|
||||
|
||||
Код | Описание | Возможное решение
|
||||
--- | --- | ---
|
||||
10022 | Возникла проблема с привязкой к порту | Проверьте, не используется ли порт сервера другой службой, если да, используйте другую.
|
||||
10048 | Адрес уже используется | На этом порту запущен другой сервер или программа BeamMP, используйте другой.
|
||||
10051 | Сеть недоступна | Неправильная переадресация портов или аналогичные проблемы. Проверьте, что все настроено правильно.
|
||||
10052 | Сброс сети | Происходит, если сеть обрывает соединение во время установки соединения. Повторите попытку соединения.
|
||||
10053 | Соединение прервано | Вызвано тайм-аутом или ошибкой сети. Повторите попытку подключения.
|
||||
10054 | Сброс соединения пиром | Клиент отключился от вашего сервера.
|
||||
10060 | Время ожидания соединения истекло | Возникла проблема с переадресацией портов. Ознакомьтесь с [пошаговыми инструкциями](create-a-server.md#1-port-forwarding) .
|
||||
10061 | В соединении отказано | Возникла проблема с переадресацией портов. Ознакомьтесь с [пошаговыми инструкциями](create-a-server.md#1-port-forwarding) .
|
||||
10064 | Хост недоступен | Маловероятная ошибка, но она означает, что хост вышел из строя из-за его отключения или закрытия портов.
|
||||
10065 | Хост недостижим | Нет интернета или плохая переадресация портов, пожалуйста, следуйте [инструкциям руководства](create-a-server.md#1-port-forwarding) .
|
||||
|
||||
!!! Примечание. Если вы немного знаете, как работают сети/сокеты, для любого другого кода, не указанного в этом списке, вы можете обратиться к [https://learn.microsoft.com/en-us/windows/win32/winsock/windows-sockets-error-codes-2](https://learn.microsoft.com/en-us/windows/win32/winsock/windows-sockets-error-codes-2) .
|
||||
@@ -0,0 +1,87 @@
|
||||
# Руководство Сервера
|
||||
|
||||
# Окружение
|
||||
|
||||
На сервер влияет состояние различных внешних параметров:
|
||||
|
||||
- Папка «Ресурсы»
|
||||
- ENV (переменные среды)
|
||||
- Аргументы командной строки
|
||||
- Файл ServerConfig.toml
|
||||
- Рабочий каталог
|
||||
|
||||
## Папка Ресурсов
|
||||
|
||||
Папка ресурсов создается при запуске сервера вместе с подкаталогами "Client" и "Server". Подкаталог "Server" принимает папки внутри себя, каждая из которых содержит как минимум один файл `.lua`. Каждая из этих папок в подкаталоге "Server" называется «плагином». Файлы `.lua`, содержащиеся в каталоге корневом каталоге плагина, перезагружаются на ходу при изменении. Подкаталог "Client" принимает *только* файлы `.zip`, которые загружаются при запуске сервера и, как предполагается, не изменяются во время выполнения.
|
||||
|
||||
## ОКРУЖАЮЩАЯ СРЕДА
|
||||
|
||||
### Общие Настройки
|
||||
|
||||
Начиная с версии Server v3.2.0, сервер BeamMP принимает переменные среды, которые **переопределяют** настройки в ServerConfig.toml. Все переменные ServerConfig, которые существуют в категории/разделе "General", имеют PascalCase, переменные среды имеют ALL_CAPS и префикс `BEAMMP_`. Например, настройка `MaxPlayers`, преобразованная в ALL_CAPS, имеет вид `MAX_PLAYERS` (обратите внимание на `_`, где начинается новое слово), а с префиксом она становится `BEAMMP_MAX_PLAYERS`. Это формат, который используется для всех настроек "General". Существуют следующие переменные ENV:
|
||||
|
||||
- `BEAMMP_DEBUG`
|
||||
- `BEAMMP_PRIVATE`
|
||||
- `BEAMMP_PORT`
|
||||
- `BEAMMP_MAX_CARS`
|
||||
- `BEAMMP_MAX_PLAYERS`
|
||||
- `BEAMMP_MAP`
|
||||
- `BEAMMP_NAME`
|
||||
- `BEAMMP_DESCRIPTION`
|
||||
- `BEAMMP_TAGS`
|
||||
- `BEAMMP_RESOURCE_FOLDER`
|
||||
- `BEAMMP_AUTH_KEY`
|
||||
- `BEAMMP_LOG_CHAT`
|
||||
|
||||
Любые переменные среды, соответствующие параметрам конфигурации, которые являются строками или числами, должны быть строками, например `BEAMMP_NAME="Cool Server"`, `BEAMMP_NAME=Server1`, `BEAMMP_PORT=12345`. Переменные среды, соответствующие параметрам конфигурации, которые являются логическими значениями (true/false, on/off), должны быть либо `true`, либо `1` (оба означают ON), либо любым другим значением (означающим OFF).
|
||||
|
||||
### Настройки Провайдера
|
||||
|
||||
Эти переменные среды позволяют хостинг-провайдерам (и другим пользователям с большим количеством серверов), далее именуемым «провайдерами», перезаписывать определенные настройки, специфичные для провайдера.
|
||||
|
||||
#### `BEAMMP_PROVIDER_PORT_ENV` (начиная с версии 3.3.0)
|
||||
|
||||
Если задана непустая строка, это заменяет переменную `BEAMMP_PORT` на другую, чтобы прочитать переменную из существующего ENV. Например, Pterodactyl может выставлять `SERVER_PORT` как ENV. Чтобы использовать его с BeamMP-Server, вам придется сделать `BEAMMP_PORT=${SERVER_PORT}`, что немного глупо.
|
||||
|
||||
Вместо этого теперь можно использовать `BEAMMP_PROVIDER_PORT_ENV="SERVER_PORT"`, что заставит BeamMP-Server прочитать порт из переменной ENV `SERVER_PORT`.
|
||||
|
||||
#### `BEAMMP_PROVIDER_DISABLE_CONFIG` (начиная с версии 3.3.0)
|
||||
|
||||
Если установлено значение `1` или `true`, `ServerConfig.toml` **не создаётся** и **не считывается**, даже если существует. Для работы сервера необходимо установить `BEAMMP_AUTH_KEY`.
|
||||
|
||||
#### `BEAMMP_PROVIDER_UPDATE_MESSAGE` (начиная с версии 3.2.2)
|
||||
|
||||
Если задано непустое значение, это заменяет все сообщение об обновлении, которое по умолчанию выглядит как "НОВАЯ ВЕРСИЯ ВЫШЛА! Пожалуйста, обновитесь до новой версии..." и т. д. **ОБЯЗАТЕЛЬНО**, чтобы предоставленное вами сообщение об обновлении содержало `{}` где-то, что сервер заменит на новый номер версии. Например, ваше сообщение об обновлении может выглядеть так:
|
||||
|
||||
```sh
|
||||
BEAMMP_PROVIDER_UPDATE_MESSAGE="NEW VERSION of the BeamMP-Server has been released: {}! Please follow the update guide here: https://example.com/update-guide"
|
||||
```
|
||||
|
||||
Что приведет к появлению сообщения об обновлении, например:
|
||||
|
||||
```
|
||||
NEW VERSION of the BeamMP-Server has been released: v5.0.2! Please follow the update guide here: https://example.com/update-guide
|
||||
```
|
||||
|
||||
Пожалуйста, постарайтесь четко разъяснить пользователям необходимость обновления и объясните, как это сделать.
|
||||
|
||||
## Аргументы командной строки
|
||||
|
||||
Запустите BeamMP Server с аргументом `--help` , чтобы узнать больше. Например: `./BeamMP-Server --help` .
|
||||
|
||||
## ServerConfig.toml
|
||||
|
||||
Этот файл генерируется при первом запуске. Комментарии внутри файла — самый современный способ понять, что делает каждая настройка.
|
||||
|
||||
## Рабочий каталог
|
||||
|
||||
Решающим фактором при определении места создания ServerConfig.toml, файлов журналов сервера и папки Resources является рабочий каталог сервера, а не местоположение исполняемого файла сервера.
|
||||
|
||||
# Ограничения
|
||||
|
||||
В Бэкэнде BeamMP действуют следующие ограничения, которые влияют на Серверы:
|
||||
|
||||
- Имя ограничено 250 символами
|
||||
- Описание ограничено 1000 символами
|
||||
- Карта ограничена 100 символами
|
||||
- Теги ограничены 100 символами
|
||||
@@ -0,0 +1,228 @@
|
||||
# Переадресация Портов
|
||||
|
||||
!!! опасность ":material-scale-balance: ОТКАЗ ОТ ОТВЕТСТВЕННОСТИ:"
|
||||
|
||||
```
|
||||
**Переадресация портов — это риск**.
|
||||
|
||||
Используя переадресацию портов, вы осознаете риски открытия портов в вашей домашней сети для публики и, следовательно, лишаете себя права привлекать BeamMP к ответственности за **любой** ущерб, который может быть причинен вам или вашему домохозяйству.
|
||||
|
||||
Мы не несем ответственности за какой-либо контент на любых внешних связанных сервисах или веб-сайтах.
|
||||
|
||||
<u>**Если вы не понимаете это руководство, рассмотрите возможность обращения к одному из наших партнеров.**</u>
|
||||
```
|
||||
|
||||
!!! предупреждение
|
||||
|
||||
```
|
||||
Пожалуйста, убедитесь, что ваш маршрутизатор не является устройством исключительно 4G/5G. Если это гибридное устройство, обязательно выберите адаптер с кабельным подключением далее в разделе 3 этого руководства!
|
||||
```
|
||||
|
||||
## Как настроить переадресацию портов.
|
||||
|
||||
Создание правила переадресации портов включает несколько подробных сетевых терминов. Будьте готовы записать несколько заметок по мере прохождения процесса.
|
||||
|
||||
В этом руководстве 4 основных шага.
|
||||
|
||||
## Краткое руководство. (Более подробное руководство приведено ниже)
|
||||
|
||||
<div class="grid cards" markdown>
|
||||
</div>
|
||||
<ul data-md-type="list" data-md-list-type="unordered" data-md-list-tight="false">
|
||||
<li data-md-type="list_item" data-md-list-type="unordered">
|
||||
<p data-md-type="paragraph">:material-dns:{ .lg .middle } <strong data-md-type="double_emphasis">Назначьте статический IP-адрес вашему компьютеру или устройствам</strong></p>
|
||||
<hr data-md-type="hrule">
|
||||
<p data-md-type="paragraph">Это необходимо для предотвращения изменения IP-адреса вашего устройства и нарушения правила переадресации портов.</p>
|
||||
<p data-md-type="paragraph"><a href="https://portforward.com/router.htm#1" data-md-type="link">:octicons-arrow-right-24: Просмотр информации о вашем маршрутизаторе</a></p>
|
||||
</li>
|
||||
<li data-md-type="list_item" data-md-list-type="unordered">
|
||||
<p data-md-type="paragraph">:material-router-wireless:{ .lg .middle } <strong data-md-type="double_emphasis">Войдите в свой маршрутизатор</strong></p>
|
||||
<hr data-md-type="hrule">
|
||||
<p data-md-type="paragraph">Обычно это можно сделать, найдя IP-адрес «шлюза по умолчанию», который можно найти, выполнив <code data-md-type="codespan">ipconfig</code> в командной строке и введя его в адресную строку веб-браузера.</p>
|
||||
</li>
|
||||
<li data-md-type="list_item" data-md-list-type="unordered">
|
||||
<p data-md-type="paragraph">:material-lan-connect:{ .lg .middle } <strong data-md-type="double_emphasis">Перенаправьте порты на ваш компьютер</strong></p>
|
||||
<hr data-md-type="hrule">
|
||||
<p data-md-type="paragraph">Найдите раздел переадресации портов в веб-интерфейсе маршрутизатора. Большинство маршрутизаторов перечисляют раздел переадресации портов в разделе «Сеть», «Дополнительно» или «Локальная сеть».</p>
|
||||
</li>
|
||||
<li data-md-type="list_item" data-md-list-type="unordered">
|
||||
<p data-md-type="paragraph">:material-test-tube:{ .lg .middle } <strong data-md-type="double_emphasis">Проверьте, что ваш порт правильно перенаправлен</strong></p>
|
||||
<hr data-md-type="hrule">
|
||||
<p data-md-type="paragraph">Используйте такой инструмент, как CheckBeamMP, чтобы проверить, работает ли правило.</p>
|
||||
<div data-md-type="block_html">
|
||||
<form action="https://check.beammp.com/api/v2/beammp" method="get" target="_blank">
|
||||
<label for="ip">IP-адрес:</label>
|
||||
<input type="text" id="ip" name="ip"><br>
|
||||
<label for="port">Порт:</label>
|
||||
<input type="text" id="port" name="port"><br>
|
||||
<input type="submit" value="CheckBeamMP">
|
||||
</form>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<div data-md-type="block_html"></div>
|
||||
|
||||
## Подробное руководство
|
||||
|
||||
### 1. Назначение статического IP-адреса
|
||||
|
||||
### Метод 1: настройка статического IP-адреса с использованием резервирования DHCP
|
||||
|
||||
Другой способ задать статический IP-адрес в локальной сети — использовать функцию резервирования DHCP вашего маршрутизатора. Не все маршрутизаторы имеют эту функцию, поэтому это может быть неподходящим вариантом для вас. Пожалуйста, найдите в Интернете модель вашего маршрутизатора, чтобы найти руководство.
|
||||
|
||||
Если вам удалось это сделать, перейдите сразу к [шагу 2.](port-forwarding.md#2-log-in-to-your-router)
|
||||
|
||||
### Метод 2: Назначение статического IP-адреса в Windows
|
||||
|
||||
#### 1.1. Найдите свой текущий IP-адрес, шлюз и DNS-серверы:
|
||||
|
||||
Прежде чем мы сможем настроить статический IP-адрес, нам нужно знать ваши текущие сетевые настройки. Вам нужно будет записать их, поэтому приготовьте блокнот. Для этого шага мы воспользуемся командной строкой.
|
||||
|
||||
Откройте командную строку. 3 основных способа:
|
||||
|
||||
- Нажмите клавишу Windows, затем начните вводить фразу «cmd», затем нажмите Enter, когда увидите выделенную строку «Командная строка».
|
||||
|
||||
|
||||
<figure class="image image_resized" style="width:62%;" markdown=""></figure>
|
||||
|
||||
После того, как вы окажетесь в командной строке, выполните следующую команду:
|
||||
|
||||
```
|
||||
ipconfig /all
|
||||
```
|
||||
|
||||
Вы увидите много данных. Если у вас есть виртуальные или несколько сетевых адаптеров, то вы увидите еще больше данных. Обычно можно увидеть много виртуальных адаптеров, если у вас установлен Hyper-V или Docker.
|
||||
|
||||
|
||||
<figure class="image image_resized" style="width:62%;" markdown=""></figure>
|
||||
|
||||
Рекомендуется использовать проводное сетевое соединение, которое будет запускать этот сервер, однако он будет работать и через беспроводное соединение. Вам нужно будет найти в этом списке адаптер, который имеет активное подключение к Интернету. Прокрутите список и найдите тот, которому назначен шлюз по умолчанию. Многие из виртуальных адаптеров не будут иметь шлюза по умолчанию.
|
||||
|
||||
Ниже приведены примеры локальных адресов IPv4, которые должен иметь хотя бы один из адаптеров. Вам нужно будет записать информацию о вашем адаптере.
|
||||
|
||||
- 192.168.xx
|
||||
- 10.xxx
|
||||
- 172.16.xx - 172.31.xx
|
||||
|
||||
Маска подсети (скорее всего 255.255.255.0) Основной шлюз (скорее всего 192.168.0.1 или 192.168.1.1)
|
||||
|
||||
!!! info "Обратите внимание" BeamMP в настоящее время не поддерживает IPv6 для хостинга сервера.
|
||||
|
||||
#### 1.2.Изменение настроек адаптера
|
||||
|
||||
Теперь нам нужно изменить настройки вашего сетевого адаптера, чтобы ваш ПК сохранил текущую конфигурацию IP. Чтобы получить доступ к настройкам вашей сети, самый быстрый способ:
|
||||
|
||||
- Нажмите один раз клавишу Windows.
|
||||
- Введите фразу «сетевые подключения», пока не увидите «Просмотр сетевых подключений».
|
||||
- Нажмите клавишу Enter.
|
||||
|
||||
|
||||
<figure class="image image_resized" style="width:62%;" markdown=""></figure>
|
||||
|
||||
Вы должны увидеть список сетевых подключений на вашем компьютере. Если у вас установлены Hyper-V или Docker, их может быть много. Найдите все адаптеры, которые не называются "Hyper-V".
|
||||
|
||||
|
||||
<figure class="image image_resized" style="width:62%;" markdown=""></figure>
|
||||
|
||||
Щелкните правой кнопкой мыши по вашему адаптеру и выберите свойства. Если `Internet Protocol Version 4` не отмечен, то это неправильный адаптер. Выберите другой.
|
||||
|
||||
|
||||
<figure class="image image_resized" style="width:62%;" markdown=""></figure>
|
||||
|
||||
Дважды щелкните по `Internet Protocol Version 4` Измените `Obtain an IP address automatically` на `Use the following IP address` .
|
||||
|
||||
Заполните поля IP-адрес, маска подсети, шлюз по умолчанию и предпочитаемый DNS-сервер, используя информацию из командной строки (ipconfig /all).
|
||||
|
||||
В качестве альтернативы вместо использования своих DNS-серверов вы можете использовать DNS-серверы CloudFlare или Google:
|
||||
|
||||
- CloudFlare DNS: 1.1.1.1, 1.0.0.1
|
||||
- Google DNS: 8.8.8.8, 8.8.4.4
|
||||
|
||||
|
||||
<figure class="image image_resized" style="width:62%;" markdown=""></figure>
|
||||
|
||||
Нажмите Ok, затем нажмите Ok еще раз, и ваш адаптер теперь изменен с DHCP на статический. Поищите в Интернете, чтобы убедиться, что у вас все еще есть подключение к Интернету. Если нет, то измените настройки обратно на Получить IP-адрес автоматически и попробуйте следующий метод.
|
||||
|
||||
### 2. Войдите в свой маршрутизатор.
|
||||
|
||||
Теперь, когда на вашем устройстве есть статический IP-адрес, вы готовы перенаправить порт для BeamMP!
|
||||
|
||||
Для начала нам нужно войти в ваш роутер. Ранее одна из настроек, которую вы записали, это ваш Default Gateway. Это IP-адрес вашего роутера.
|
||||
|
||||
Большинство маршрутизаторов используют локально размещенную веб-страницу для управления. Чтобы просмотреть меню и настройки маршрутизатора:
|
||||
|
||||
- Откройте веб-браузер. Firefox, Chrome или Edge должны работать нормально.
|
||||
- В адресной строке введите IP-адрес вашего шлюза по умолчанию, например 192.168.0.1 или 192.168.1.1, и нажмите Enter.
|
||||
|
||||
Теперь вы должны увидеть экран входа в систему вашего маршрутизатора. Не все маршрутизаторы требуют входа в систему, но большинство требуют. Вам необходимо знать имя пользователя и пароль вашего маршрутизатора. Если вы никогда не входили в систему раньше, ваши имя пользователя и пароль, скорее всего, установлены на заводские значения по умолчанию или, в некоторых случаях, написаны на наклейке вашего маршрутизатора.
|
||||
|
||||
Ниже перечислены некоторые из наиболее распространенных заводских имен пользователей и паролей:
|
||||
|
||||
Имя пользователя | Пароль
|
||||
--- | ---
|
||||
админ | админ
|
||||
админ | пароль
|
||||
{пустой} | админ
|
||||
{пустой} | пароль
|
||||
|
||||
Попробуйте различные комбинации admin, password и оставьте записи пустыми. *Там, где написано blank, попробуйте оставить значение пустым.*
|
||||
|
||||
### 3. Создайте правила пересылки!
|
||||
|
||||
#### 3.1. Найдите раздел пересылки
|
||||
|
||||
Найдите раздел переадресации портов в веб-интерфейсе маршрутизатора. Перемещайтесь по маршрутизатору, нажимая вкладки или ссылки в верхней или левой части каждой страницы. Большинство маршрутизаторов перечисляют раздел переадресации портов в разделе «Сеть», «Дополнительно» или «Локальная сеть». Найдите его по следующим ключевым словам:
|
||||
|
||||
- Переадресация портов
|
||||
- Пересылка
|
||||
- Переадресация диапазона портов
|
||||
- Виртуальные серверы
|
||||
- Приложения и игры
|
||||
- Расширенные настройки/параметры
|
||||
- НАТ
|
||||
|
||||
#### 3.2. Введите данные
|
||||
|
||||
Как только вы найдете раздел переадресации портов вашего маршрутизатора, вы готовы ввести необходимую информацию. На вашем маршрутизаторе будет место для ввода портов, которые нужно переадресовать, и IP-адрес назначения, чтобы указать эти переадресованные порты. Если на вашем маршрутизаторе указаны как внутренние, так и внешние порты, сделайте их одинаковыми.
|
||||
|
||||
Для BeamMP требуются как UDP-, так и TCP-порт 30814 (если вы не изменили это в [ServerConfig.toml](create-a-server.md#4-configuration) ).
|
||||
|
||||
!!! info "Примечание" Хотя **порт** по умолчанию - **30814** , вы можете выбрать любой другой номер больше 1024, но меньше 65535, но вам нужно записать, что вы выбрали, если это не 30814. Вам нужно перенаправить как **TCP** , так и **UDP** . Рекомендуется придерживаться порта по умолчанию, так как он вряд ли будет использоваться другой службой на вашем ПК. Однако, если вы размещаете несколько серверов на одной машине, каждому серверу нужен свой порт. Например, сервер 1: 30814, сервер 2: 30815.
|
||||
|
||||
На некоторых маршрутизаторах вам может потребоваться создать два правила: одно для UDP и одно для TCP, в то время как другие удобны и позволяют сделать и то, и другое с помощью одного правила!
|
||||
|
||||
На большинстве маршрутизаторов есть кнопка «Сохранить», а на некоторых маршрутизаторах требуется перезапуск или перезагрузка, чтобы изменения вступили в силу.
|
||||
|
||||
### 4. Время тестировать!
|
||||
|
||||
Есть несколько способов проверить соединение.
|
||||
|
||||
Наш рекомендуемый способ — использовать наш инструмент **CheckBeamMP**, так как он проверяет проблемы и протоколы, специфичные для BeamMP.
|
||||
|
||||
<form action="https://check.beammp.com/api/v2/beammp" method="get" target="_blank">
|
||||
<label for="ip">IP-адрес:</label>
|
||||
<input type="text" id="ip" name="ip"><br>
|
||||
<label for="port">Порт:</label>
|
||||
<input type="text" id="port" name="port"><br>
|
||||
<input type="submit" value="CheckBeamMP">
|
||||
</form>
|
||||
|
||||
Это можно сделать, получив свой публичный IPv4-адрес, это опять же можно сделать несколькими способами. Основной способ — использовать веб-сайт [whatsmyip.org](https://whatsmyip.org/) . Это простой веб-сайт, который отображает ваш публичный IP-адрес. Вам следует искать IP-адрес в формате: xxx.xxx.xxx.xxx
|
||||
|
||||
Перейдите по следующей ссылке и замените «IP» на ваш реальный адрес IPv4, а «Port» на порт вашего сервера. Не оставляйте пробелов. https://check.beammp.com/api/v2/beammp/ip/port
|
||||
|
||||
!!! успех "статус:ok"
|
||||
|
||||
```
|
||||
Если вы получили результат, аналогичный приведенному выше, то теперь вы можете присоединиться к своему серверу!
|
||||
Присоединиться можно двумя способами: либо напрямую, используя данные, введенные вами в «Вероятно UP», либо, если ваш сервер настроен как «публичный», через список серверов.
|
||||
Поскольку вы размещаете сервер локально, используйте 127.0.0.1 (localhost), если сервер работает на том же компьютере, что и вы, или LAN IPv4 локальной машины, на которой работает сервер.
|
||||
```
|
||||
|
||||
!!! сбой "статус:ошибка"
|
||||
|
||||
```
|
||||
Если соединение полностью отсутствует, ваш интернет-провайдер может использовать CGNAT (трансляцию сетевых адресов операторского класса). Для получения более подробной информации, пожалуйста, проверьте [Как проверить наличие CGNAT?](../FAQ/How-to-check-for-CGNAT.md),
|
||||
или откройте тикет в службу поддержки сервера на нашем [сервере Discord](https://discord.gg/beammp) в канале `#support`, и один из наших сотрудников займется вашим тикетом!
|
||||
Если вы видите, что работает только TCP, а UDP не работает, еще раз проверьте правила брандмауэра и переадресации портов.
|
||||
```
|
||||
@@ -0,0 +1,245 @@
|
||||
# Обслуживание Сервера
|
||||
|
||||
Руководства, советы и рекомендации по настройке и обслуживанию сервера BeamMP.
|
||||
|
||||
## Как установить
|
||||
|
||||
Инструкции по установке см. в разделе [Установка сервера](create-a-server.md).
|
||||
|
||||
## Файл ServerConfig
|
||||
|
||||
Конфигурация сервера, представляющая собой файл `ServerConfig.toml`, использует [формат TOML](https://toml.io/en/).
|
||||
|
||||
*ПРИМЕЧАНИЕ*: *Старый* файл конфигурации сервера назывался `Server.cfg`, но он больше не используется, и сервер выдаст предупреждение, если он все еще присутствует. Также обратите внимание, что два формата конфигурации **несовместимы** друг с другом.
|
||||
|
||||
По умолчанию в конфигурации есть один раздел, называемый `[General]`, который содержит следующие значения:
|
||||
|
||||
Ключ | Тип значения | Описание
|
||||
--- | --- | ---
|
||||
Порт | 1024-65535 | Сетевой порт, по которому сервер будет доступен. (Должен быть уникальным и не использоваться другим сервисом на том же хосте).
|
||||
AuthKey | Формат AuthKey `xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` где все x — буквенно-цифровые символы (цифры и буквы) | Используется для идентификации публичного сервера в бэкенде.
|
||||
AllowGuests | правда/ложь | Определяет, разрешено ли гостям подключаться к серверу или нет.
|
||||
LogChat | правда/ложь | Если включено (true), сообщения чата записываются в файл server.log.
|
||||
Отлаживать | правда/ложь | При включении (true) будет отображаться больше сообщений в журнале и предоставляться больше информации. Включите это, если у вас возникнут проблемы. Включение этого параметра значительно увеличит размер файла журнала.
|
||||
Частный | правда/ложь | Если включено (true), ваш сервер не будет отображаться в списке серверов. Любой с правильным IP и портом все равно сможет подключиться.
|
||||
InformationPacket | правда/ложь | Если включено (true), сервер будет позволять неаутентифицированным клиентам получать ту же информацию, что и в списке серверов, но напрямую с сервера.
|
||||
Имя | Любой "текст" | Отображается как имя/заголовок вашего сервера в списке серверов. Вы можете использовать специальные символы для форматирования с помощью цветов и стилей.
|
||||
Tags | См. список разрешённых тегов ниже. | Теги для поиска, например: Police, Racing и т.д.
|
||||
МаксКарс | Любое число ≥ 1 | Максимальное количество машин на игрока. Любые дополнительные машины, которые игрок попытается создать, будут мгновенно удалены.
|
||||
MaxPlayers | Любое число ≥ 1 | Максимальное количество игроков на сервере. Это не влияет на количество транспортных средств.
|
||||
Карта | Допустимое местоположение на карте, например `/levels/gridmap_v2/info.json` | Карта, которую будет размещать ваш сервер. Должна быть установлена либо по умолчанию (список можно найти ниже), либо как серверный мод.
|
||||
Описание | Любой "текст" | Отображается как описание сервера в списке серверов (если сервер публичный). Вы можете использовать специальные символы для форматирования с помощью цветов и стилей.
|
||||
ResourceFolder | Корректный путь к папке, например: "D:\Server\BeamMP\Resources" | Полезно хранить сервер и папку ресурсов отдельно.
|
||||
ImScaredOfUpdates | правда/ложь | Определяет, будет ли сервер автоматически обновляться при выходе новой версии.
|
||||
UpdateReminderTime | Любое число с суффиксом s, min, h или d (например, 30s). | Задаёт интервал напоминаний об обновлении, выводимых в терминал.
|
||||
|
||||
Другие разделы могут и должны использоваться серверными плагинами (скоро появится API Lua), например: `[MyMod]`.
|
||||
|
||||
AuthKey **ДОЛЖЕН** быть установлен вами. Он будет пустым по умолчанию и должен быть заполнен вашим AuthKey с шага установки ранее. Не делитесь этим ключом ни с кем и на снимках экрана полностью размывайте его.
|
||||
|
||||
### Все названия ванильных карт
|
||||
|
||||
Вот все карты акций:
|
||||
|
||||
- /levels/gridmap_v2/info.json
|
||||
- /levels/johnson_valley/info.json
|
||||
- /levels/automation_test_track/info.json
|
||||
- /levels/восточное_побережье_США/info.json
|
||||
- /levels/hirochi_raceway/info.json
|
||||
- /уровни/италия/info.json
|
||||
- /levels/jungle_rock_island/info.json
|
||||
- /уровни/промышленный/info.json
|
||||
- /levels/маленький_остров/info.json
|
||||
- /уровни/smallgrid/info.json
|
||||
- /levels/юта/info.json
|
||||
- /levels/западное_побережье_США/info.json
|
||||
- /уровни/обучение_водителей/info.json
|
||||
- /levels/derby/info.json
|
||||
|
||||
### Настройте внешний вид имени вашего сервера
|
||||
|
||||
Используйте эти специальные символы перед текстом, и к этому тексту в списке серверов будет применен эффект:
|
||||
|
||||
Ценить | Описание
|
||||
:-: | ---
|
||||
`^r` | Перезагрузить
|
||||
`^p` | Новая строка (только описания)
|
||||
`^n` | Подчеркнуть
|
||||
`^l` | Смелый
|
||||
`^m` | Зачеркивание
|
||||
`^o` | Курсив
|
||||
`^0` | Черный
|
||||
`^1` | Синий
|
||||
`^2` | Зеленый
|
||||
`^3` | светло-голубой
|
||||
`^4` | Красный
|
||||
`^5` | Розовый
|
||||
`^6` | Апельсин
|
||||
`^7` | Серый
|
||||
`^8` | Темно-серый
|
||||
`^9` | Светло-фиолетовый
|
||||
`^a` | Светло-зеленый
|
||||
`^b` | светло-голубой
|
||||
`^c` | Темно-оранжевый
|
||||
`^d` | светло-розовый
|
||||
`^e` | Желтый
|
||||
`^f` | Белый
|
||||
|
||||
### Настройте теги вашего сервера
|
||||
|
||||
Теги могут использоваться для того, чтобы позволить людям искать определенный тип сервера. Ваш serverConfig.toml будет сгенерирован с тегом freeroam `Tags = "Freeroam"`.
|
||||
|
||||
Вы можете добавить несколько тегов, разделенных запятой `Tags = "Events,Offroad,lang:english"`, регистр не учитывается.
|
||||
|
||||
Вы можете выбрать из следующего списка:
|
||||
|
||||
- Возраст/Содержание:
|
||||
|
||||
- `Mature/18+`
|
||||
|
||||
- Типы игрового процесса:
|
||||
|
||||
- `Freeroam`
|
||||
- `Roleplay`
|
||||
- `Economy`
|
||||
- `Traffic`
|
||||
|
||||
- Категории гонок:
|
||||
|
||||
- `Racing`
|
||||
- `Racing:NASCAR`
|
||||
- `Racing:Track`
|
||||
- `Racing:Drag`
|
||||
- `Racing:Rally`
|
||||
- `Touge`
|
||||
|
||||
- Бездорожье и испытания:
|
||||
|
||||
- `Offroad`
|
||||
- `Crawling`
|
||||
- `Dakar`
|
||||
- `Challenge`
|
||||
|
||||
- События разрушения:
|
||||
|
||||
- `Derby`
|
||||
- `Arena`
|
||||
|
||||
- Погодные и временные условия:
|
||||
|
||||
- `Snow/Ice`
|
||||
- `Rain`
|
||||
- `Night`
|
||||
- `Weather`
|
||||
|
||||
- Режимы игры:
|
||||
|
||||
- `Gamemode`
|
||||
- `Gamemode:Racing`
|
||||
- `Gamemode:Rally`
|
||||
- `Gamemode:Drag`
|
||||
- `Gamemode:Derby`
|
||||
- `Gamemode:Infection`
|
||||
- `Gamemode:Cops-Robbers`
|
||||
- `Gamemode:Delivery`
|
||||
- `Gamemode:Sumo`
|
||||
|
||||
- Сообщество и события:
|
||||
|
||||
- `Scenarios`
|
||||
- `Events`
|
||||
- `Leaderboard`
|
||||
|
||||
- Модификации:
|
||||
|
||||
- `Modded`
|
||||
- `Mod:BeamPaint`
|
||||
- `Mod:BeamJoy`
|
||||
- `Mod:CEI`
|
||||
|
||||
- Языки:
|
||||
|
||||
- `Lang:English`
|
||||
- `Lang:Russian`
|
||||
- `Lang:French`
|
||||
- `Lang:Spanish`
|
||||
- `Lang:Portuguese`
|
||||
- `Lang:German`
|
||||
- `Lang:Polish`
|
||||
- `Lang:Arabic`
|
||||
|
||||
- Другой:
|
||||
|
||||
- `Vanilla`
|
||||
- `Moderated`
|
||||
|
||||
Если тег отсутствует в этом списке, вы можете отправить запрос на его добавление [здесь](https://forum.beammp.com/t/introducing-server-tags/1320081)
|
||||
|
||||
## Файл Server.log
|
||||
|
||||
Этот файл будет сгенерирован при запуске сервера. Это зеркало сообщений, которые вы видите в консоли при запуске сервера. Вам следует прикреплять этот файл каждый раз, когда вам нужна поддержка от нашей службы поддержки, и он никогда не покажет ваш AuthKey, поэтому вы обычно можете отправить его без изменений.
|
||||
|
||||
Формат следующий (префикс $ означает «переменная», пояснение ниже):
|
||||
|
||||
```
|
||||
[$DATE $TIME] $CONTEXT [$LOG_LEVEL] $MESSAGE
|
||||
```
|
||||
|
||||
Где:
|
||||
|
||||
- `$DATE` — дата сообщения, например 21/07/2021
|
||||
- `$TIME` — время сообщения, например 11:05:23
|
||||
- `$CONTEXT` (виден только в режиме отладки и в основном актуален для разработчиков) — контекст сообщения, который может быть:
|
||||
- `(Player ID) “Player Name”`, где ID игрока полезен для модерации
|
||||
- Короткое имя, например «HeartbeatThread»
|
||||
- `$LOG_LEVEL` — один из уровней важности сообщения:
|
||||
- `DEBUG`: отображается только в режиме отладки, обычно является спамом и важен только для разработчиков.
|
||||
- `INFO`: Общая информация
|
||||
- `LUA`: Сообщение от плагина Lua
|
||||
- `WARN`: Описывает то, что не должно происходить, обычно
|
||||
- `ERROR`: Что-то пошло не так или произошло очень неожиданно.
|
||||
- `FATAL`: Произошло что-то, что привело к отключению сервера.
|
||||
- `$MESSAGE` само сообщение, обычно то, на что следует обратить внимание и что следует понять. В некоторых случаях это может быть зашифровано, но общее правило заключается в том, что пока нет видимых проблем с сервером и нет ОШИБОК, все хорошо.
|
||||
|
||||
## Обновление сервера
|
||||
|
||||
### Зачем обновлять
|
||||
|
||||
Всякий раз, когда выходит новое обновление, вам рекомендуется обновить свой сервер. Обычно это включает исправления ошибок, улучшения стабильности и безопасности, наряду с общими новыми функциями и т. д., которые вводятся.
|
||||
|
||||
Чтобы получать новости об обновлениях по мере их выхода, подпишитесь на канал «обновления» сервера Discord, ищите его на форумах или посетите/спросите на [странице релизов GitHub](https://github.com/BeamMP/BeamMP-Server/releases).
|
||||
|
||||
### Как обновить
|
||||
|
||||
#### Если вы пользуетесь услугами хостинг-провайдера, являющегося партнером BeamMP
|
||||
|
||||
Если вы используете хостинг-провайдера, партнера BeamMP, инструкции ниже, скорее всего, не сработают. Мы рекомендуем дождаться более подробной информации от вашего хостинг-провайдера или связаться с ним для получения помощи.
|
||||
|
||||
#### Самостоятельное управление сервером
|
||||
|
||||
Сервер обновляется путем замены старого исполняемого файла на новый. Если вы не уверены, как это сделать, ниже приведены пошаговые инструкции для Windows и Linux.
|
||||
|
||||
Если вы собрали из исходников, просто пересоберите. Убедитесь, что выполнили `git submodule update --init --recursive` перед пересборкой.
|
||||
|
||||
#### В Windows
|
||||
|
||||
1. Для запуска сервера убедитесь, что у вас установлены [Visual C++ Redistributables](https://aka.ms/vs/17/release/vc_redist.x64.exe).
|
||||
2. Перейдите на [BeamMP.com](https://beammp.com/) и нажмите кнопку «Загрузить сервер».
|
||||
3. После загрузки вы должны увидеть один файл с именем `BeamMP-Server.exe`. Мы назовем его «новый исполняемый файл».
|
||||
4. Перейдите в папку, где находится ваш текущий исполняемый файл `BeamMP-Server.exe` (обычно это та же папка, где находится ваш `ServerConfig.toml`). Мы будем называть его «старым исполняемым файлом».
|
||||
5. Замените старый исполняемый файл новым исполняемым файлом (например, скопировав или переместив новый исполняемый файл в папку).
|
||||
|
||||
#### На Линуксе
|
||||
|
||||
1. Перейдите на [BeamMP.com](https://beammp.com/) и нажмите кнопку «Загрузить сервер», вы будете перенаправлены на страницу релиза сервера на Github.
|
||||
2. Загрузите правильную версию для вашего дистрибутива. Для простоты теперь он будет называться `BeamMP-Server-xxx`, где `xxx` обозначает версию для используемого вами дистрибутива.
|
||||
3. После загрузки вы должны увидеть один файл с именем `BeamMP-Server-xxx` в зависимости от версии, которую вы скачали. Мы назовем его «новый исполняемый файл».
|
||||
4. Перейдите в папку, где находится ваш текущий исполняемый файл `BeamMP-Server-xxx` (обычно это та же папка, где находится ваш `ServerConfig.toml`). Мы будем называть его «старым исполняемым файлом».
|
||||
5. Замените старый исполняемый файл новым исполняемым файлом (например, скопировав или переместив новый исполняемый файл в папку).
|
||||
6. Откройте терминал в той папке, где вы только что заменили исполняемый файл, и выполните `sudo chmod +x BeamMP-Server-xxx`. Это позволит убедиться, что сервер может быть запущен.
|
||||
|
||||
### Автоматические обновления
|
||||
|
||||
Сервер не поддерживает автоматические обновления или уведомления об обновлениях (пока).
|
||||
|
||||
Однако вы можете запросить API GitHub для получения последней версии, проверив версию сервера по тегам. Вы можете получить это с помощью GET из `https://api.github.com/repos/BeamMP/BeamMP-Server/git/refs/tags`.
|
||||
@@ -0,0 +1,25 @@
|
||||
# 问题
|
||||
|
||||
启动器没有连接到游戏。这个快速指南解释了如何手动更改启动器端口。
|
||||
|
||||
# 手动修改端口
|
||||
|
||||
1. 启动 BeamNG
|
||||
2. 在主菜单, 打开设置, 然后找到 “Multiplayer”
|
||||
3. 在 “multiplayer” 设置, 启用 `显示高级选项`
|
||||
4. 向下滚动
|
||||
5. 在`启动端口号`中,将端口号更改为其他内容,例如4567
|
||||
6. 关闭 BeamNG
|
||||
7. 右键单击BeamMP-launcher快捷方式,并在上下文菜单中选择`“Open file location”`
|
||||
8. 用文本编辑器打开`launcher.cfg`文件
|
||||
9. 将`“port”:4444,`的编号更改为与之前在游戏内选项中使用的相同,在本例中为4567
|
||||
10. 保存设置并关闭文本编辑器
|
||||
11. 启动 BeamMP-launcher
|
||||
|
||||
如果仍然没有连接,用另一个端口再试一次。在~2000到65535之间的任何数字都是有效的端口
|
||||
|
||||
## 还面临问题吗?
|
||||
|
||||
在我们的[Discord服务器](https://discord.gg/BeamMP)上创建一个支持票。
|
||||
|
||||
标签: Launcher, Connection Failed, Port Number
|
||||
@@ -0,0 +1,42 @@
|
||||
## 为什么我需要停用我的模组 ?
|
||||
|
||||
在BeamMP中,您决定连接的服务器提供了必要的模块。这些会在连接时被下载并自动启用。安装本地模组并启用通常会导致BeamMP不能正常工作,即使您除了BeamMP之外只有一个额外的模组。
|
||||
|
||||
!!! 警告
|
||||
|
||||
```
|
||||
移除你安装在BeamNG.Drive\content\或子文件夹的任何模组。这个位置不是用来安装mod的,可能会导致位于同一目录下的“DO_NOT_INSTALL_MODS_HERE.txt”文件中所述的问题。
|
||||
|
||||
!!! 引用“DO_NOT_INSTALL_MODS_HERE.txt”
|
||||
|
||||
不要复制mod到这个文件夹:它会导致损坏的mod,更新的安装速度变慢,损坏的mod管理器,损坏的安全模式和其他。
|
||||
```
|
||||
|
||||
## 我如何停用/删除我的模组 ?
|
||||
|
||||
在使用BeamMP时,有3个选项可以解决可能出现的问题。
|
||||
|
||||
### 1. 禁用模组
|
||||
|
||||
在加入任何服务器之前,请确保除了启用“multiplayerbeammp”之外没有其他mod。如果游戏死机或者你仍然有问题,请参考下一个选项
|
||||
|
||||
### 2. 创建一个新的用户文件夹
|
||||
|
||||
打开BeamNG.Drive的用户文件夹,并将`current`文件夹重命名为例如`current_old`。在重命名之前记得关闭BeamNG。
|
||||
|
||||
### 3. 从内容文件夹中删除模组。
|
||||
|
||||
访问BeamNG.Drive\content\文件夹并删除文件夹中的任何模组,打开安装位置的BeamNG.Drive。右键单击`content`文件夹并删除它。继续通过Steam或Epic Games验证游戏文件。这将再次下载文件。
|
||||
|
||||
完成后,通过BeamMP- launcher启动BeamNG,您应该将“multiplayerbeammp”作为模组管理器中唯一启用的mod,然后点击主菜单上的按钮进入BeamMP。如果你在加入mod服务器时仍然有问题,他们可能提供了损坏/未更新的mod。
|
||||
|
||||
### 4. 清理BeamMP-Launcher缓存
|
||||
|
||||
要从BeamMP目录中清除缓存的模组,请转到BeamMP- launcher的安装位置。默认情况下,路径为“C:\Users\AppData\BeamMP-Launcher”。在那里,你会发现一个“Resources”文件夹。删除这个文件夹来删除所有缓存的mod。如果您需要更多磁盘空间或想要删除过时的BeamNG模组,这将非常有用。
|
||||
|
||||
!!! 问题 "我的设置和配置文件都不见了! 我怎样才能恢复呢?"
|
||||
|
||||
```
|
||||
如果你重命名了用户文件夹,你就会让游戏创建一个新的、干净的用户文件夹。你可以从你重命名的文件夹中复制“settings”和“vehicles”文件夹。‘ current_old ’)到它创建的新文件夹。
|
||||
确保BeamNG已关闭,并替换要复制文件夹到的位置中的所有要素。现在,您应该就会有与以前一样的所有配置和设置。
|
||||
```
|
||||
@@ -0,0 +1,52 @@
|
||||
# 如何在Windows Defender防火墙和防病毒软件中创建白名单?
|
||||
|
||||
!!! info
|
||||
|
||||
```
|
||||
在修改防火墙之前,请确保将windows网络设置中的网络设置为专用(假设您在私有网络中)。
|
||||
|
||||
!!! 免责声明:"
|
||||
|
||||
**防火墙/防御器关闭具有风险**。
|
||||
|
||||
通过创建排除条款,您了解允许在PC上运行程序并向公众开放家庭网络端口的风险,从而使BeamMP对可能发生在您或您的家庭中的任何和所有损害负责的权利无效。
|
||||
|
||||
我们对任何外部链接服务或网站上的任何内容不承担任何责任。
|
||||
```
|
||||
|
||||
## 为 BeamMP-Launcher 添加 Windows Defender 防火墙例外规则
|
||||
|
||||
1. 打开带有高级设置的`Windows Defender防火墙。`
|
||||
2. 在窗口中,单击`入站`以打开入站规则选项卡。
|
||||
3. 点击 `新建规则` 在右上方创建一个新的规则。
|
||||
4. 选择`程序`以创建特定于程序的规则。
|
||||
5. 请输入 `BeamMP-Launcher.exe` 的完整限定路径。<br>默认路径为 `%appdata%\BeamMP-Launcher\BeamMP-Launcher.exe`(请勿包含引号)。
|
||||
6. 确保允许连接
|
||||
7. 给排除项起一个名字(例如:“BeamMP-Launcher”)并保存它。
|
||||
8. 重启电脑
|
||||
|
||||
## 1.1 为 BeamMP-Launcher 添加 Windows Defender 防火墙例外规则
|
||||
|
||||
1. 打开 `Windows Defender高级防火墙设置`.
|
||||
2. 在窗口中,点击 `入站` 以打开入站规则选项卡。
|
||||
3. 在右上角点击 `新建规则` 以创建一条新的规则。
|
||||
4. 选择 `端口` 以创建针对特定程序的规则。
|
||||
5. 输入与 ServerConfig.toml 中配置的相同的端口号。
|
||||
6. 请输入 `BeamMP-Server.exe` 的完整限定路径。<br>该文件位于你下载后自行放置的位置。
|
||||
7. 确保允许连接
|
||||
8. 为该排除规则命名(例如 “BeamMP-Server”),然后保存规则。
|
||||
9. 重启电脑
|
||||
|
||||
## 2. BeamMP-Launcher 与 BeamMP-Server 的 Windows Defender 病毒防护排除设置
|
||||
|
||||
1. 打开 `Windows 安全中心` 应用.
|
||||
2. 单击第一个项目`病毒和威胁防护`。
|
||||
3. 单击“病毒和威胁防护设置”下方的`管理设置`。
|
||||
4. 向下滚动以导航到`排除项`选项卡。
|
||||
5. 在那里,单击“添加排除项”并选择`进程`。
|
||||
6. 在字段中输入 `BeamMP-Launcher.exe` 或 `BeamMP-Server.exe`,然后保存。
|
||||
7. 重启电脑。
|
||||
|
||||
## 还有问题吗?
|
||||
|
||||
在[论坛](https://forum.beammp.com)或我们的[Discord服务器](https://discord.gg/beammp) `#support`频道中打开一个频道。
|
||||
@@ -0,0 +1,45 @@
|
||||
如何检查CGNAT?
|
||||
|
||||
## 问题
|
||||
|
||||
所有防火墙规则和端口转发规则设置正确,但没有人可以加入您的家庭托管服务器?
|
||||
|
||||
如果您有连接问题,并且您正在使用托管服务,请联系他们寻求帮助。如果您想使用VPS或无法在家中托管服务器,请查看我们的[合作托管服务列表](../../server/create-a-server/#partnered-hosting-services-paid)(服务器设置文档)。
|
||||
|
||||
# CGNAT是什么?
|
||||
|
||||
有关CGNAT是什么以及在尝试在家中托管服务器时为什么会出现问题的详细解释,请查看[这个页面](https://en.wikipedia.org/wiki/Carrier-grade_NAT)。
|
||||
|
||||
# 怎么检查CGNAT?
|
||||
|
||||
## 方法 1:
|
||||
|
||||
打开命令提示符,运行`tracert -4 beammp.com`。这将输出一系列网络跳数。等待操作完成(可能需要30跳)。检查路由器/调制解调器/网关IP后的前几个IP地址。如果有多个IP地址在`100.64.x.x`—`100.127.x。X `或`10.xx.xx。xx`出现在第一跳之后,您很可能在CGNAT后面。
|
||||
|
||||
!!! 注意
|
||||
|
||||
```
|
||||
第一跳将是你的路由器/调制解调器/网关,不同的设备不同。
|
||||
本地网络的官方范围如下:‘ ’ 10.0.0。Xxx ' ' - ' ' 192.168.xxx. Xxx。Xxx ' ' - ' ' ' 172.16.xxx.xxx ' ‘ ’
|
||||
```
|
||||
|
||||
## 方法 2:
|
||||
|
||||
在路由器的接口上查找WAN IP。将其与发布在例如https://whatsmyip.org上的IP进行比较。如果它们不一样,你就落后于CGNAT。
|
||||
|
||||
## 方法 3/解决方案:
|
||||
|
||||
请致电互联网服务提供商寻求帮助。根据您的ISP,他们可能不提供专用的*动态* IP地址。请记住,静态IP不是必需的。
|
||||
|
||||
!!! 警告
|
||||
|
||||
```
|
||||
互联网服务提供商可能只提供专用IP地址作为**付费选项**。
|
||||
请检查我们的合作托管服务的价格,因为他们可能比这个费用便宜!
|
||||
```
|
||||
|
||||
非CGNAT网络的示例:
|
||||
|
||||

|
||||
|
||||
标签: Server, 10060 10061, CGNAT, Connection Failed, Port Forward, Firewall
|
||||
@@ -0,0 +1,42 @@
|
||||
## 为什么我需要停用我的模组 ?
|
||||
|
||||
在BeamMP中,您决定连接的服务器提供了必要的模块。这些会在连接时被下载并自动启用。安装本地模组并启用通常会导致BeamMP不能正常工作,即使您除了BeamMP之外只有一个额外的模组。
|
||||
|
||||
!!! 警告
|
||||
|
||||
```
|
||||
移除你安装在BeamNG.Drive\content\或子文件夹的任何模组。这个位置不是用来安装mod的,可能会导致位于同一目录下的“DO_NOT_INSTALL_MODS_HERE.txt”文件中所述的问题。
|
||||
|
||||
!!! 引用“DO_NOT_INSTALL_MODS_HERE.txt”
|
||||
|
||||
不要复制mod到这个文件夹:它会导致损坏的mod,更新的安装速度变慢,损坏的mod管理器,损坏的安全模式和其他。
|
||||
```
|
||||
|
||||
## 我如何停用/删除我的模组 ?
|
||||
|
||||
在使用BeamMP时,有3个选项可以解决可能出现的问题。
|
||||
|
||||
### 1. 禁用模组
|
||||
|
||||
在加入任何服务器之前,请确保除了启用“multiplayerbeammp”之外没有其他mod。如果游戏死机或者你仍然有问题,请参考下一个选项
|
||||
|
||||
### 2. 创建一个新的用户文件夹
|
||||
|
||||
打开BeamNG.Drive的用户文件夹,并将`current`文件夹重命名为例如`current_old`。在重命名之前记得关闭BeamNG。
|
||||
|
||||
### 3. 从内容文件夹中删除模组。
|
||||
|
||||
访问BeamNG.Drive\content\文件夹并删除文件夹中的任何模组,打开安装位置的BeamNG.Drive。右键单击`content`文件夹并删除它。继续通过Steam或Epic Games验证游戏文件。这将再次下载文件。
|
||||
|
||||
完成后,通过BeamMP- launcher启动BeamNG,您应该将“multiplayerbeammp”作为模组管理器中唯一启用的mod,然后点击主菜单上的按钮进入BeamMP。如果你在加入mod服务器时仍然有问题,他们可能提供了损坏/未更新的mod。
|
||||
|
||||
### 4. 清理BeamMP-Launcher缓存
|
||||
|
||||
要从BeamMP目录中清除缓存的模组,请转到BeamMP- launcher的安装位置。默认情况下,路径为“C:\Users\AppData\BeamMP-Launcher”。在那里,你会发现一个“Resources”文件夹。删除这个文件夹来删除所有缓存的mod。如果您需要更多磁盘空间或想要删除过时的BeamNG模组,这将非常有用。
|
||||
|
||||
!!! 问题 "我的设置和配置文件都不见了! 我怎样才能恢复呢?"
|
||||
|
||||
```
|
||||
如果你重命名了用户文件夹,你就会让游戏创建一个新的、干净的用户文件夹。你可以从你重命名的文件夹中复制“settings”和“vehicles”文件夹。‘ current_old ’)到它创建的新文件夹。
|
||||
确保BeamNG已关闭,并替换要复制文件夹到的位置中的所有要素。现在,您应该就会有与以前一样的所有配置和设置。
|
||||
```
|
||||
@@ -0,0 +1,20 @@
|
||||
# 问题
|
||||
|
||||
启动器无法更新或显示空白屏幕?这个快速指南解释了如何手动更新启动器。
|
||||
|
||||
!!! 注意
|
||||
|
||||
```
|
||||
请确保您已通过官网(https://beammp.com)提供的安装程序完成BeamMP的安装及运行,然后再继续后续操作。
|
||||
```
|
||||
|
||||
# 下载并安装一个新的启动器
|
||||
|
||||
1. 直接从[GitHub仓库](https://github.com/BeamMP/BeamMP-Launcher/releases/latest/download/BeamMP-Launcher.exe)下载最新版启动器
|
||||
2. 定位至BeamMP-Launcher.exe所在目录:默认安装路径:`C:\Users\<用户名>\AppData\Roaming\`(将 <用户名> 替换为您的Windows账户名称)<br>自定义安装路径:若您此前将BeamMP安装至其他位置(例如 `D:\BeamMP-Launcher`),请将新启动器文件放入对应文件夹
|
||||
3. 在BeamMP-Launcher文件夹内,使用新启动器覆盖替换旧版本(如存在)
|
||||
4. 按常规方式启动BeamMP-Launcher以验证运行状态
|
||||
|
||||
## 还面临问题?
|
||||
|
||||
请于我们的[Discord服务器](https://discord.gg/BeamMP)创建技术支持工单,标签标注:Launcher, download
|
||||
@@ -0,0 +1,64 @@
|
||||
# 常见问题解答
|
||||
|
||||
常见问题列表。
|
||||
|
||||
---
|
||||
|
||||
## **客户端**
|
||||
|
||||
---
|
||||
|
||||
### **如何安装 BeamMP?**
|
||||
|
||||
关于如何在Windows上安装BeamMP的完整指南,您可以在[这里](https://docs.beammp.com/game/getting-started/)找到它。
|
||||
|
||||
---
|
||||
|
||||
### **BeamMP可以运行在盗版或者修改版的BeamNG吗?**
|
||||
|
||||
BeamMP 无法在盗版或旧版本的 BeamNG.drive 上运行。包括但不限于第三方插件在内的修改可能会干扰 BeamMP 的正常运行(请参阅[如何清理插件](https://github.com/Protogen187/Docs/blob/main/docs/en/FAQ/Clearing-mods.md))。<br>BeamMP 支持团队无法针对盗版、旧版本或其他经过修改的 BeamNG.drive 所产生的问题提供技术支持。
|
||||
|
||||
---
|
||||
|
||||
### **BeamMP 可以在 Linux 上运行吗?**
|
||||
|
||||
客户端在Linux上不被官方支持。但是,您可以查看我们的[指南来了解如何在Linux上使用BeamMP](../game/getting-started/#2b-linux-installation)。
|
||||
|
||||
---
|
||||
|
||||
### **为什么启动器被我的杀毒软件或Windows Defender标记**
|
||||
|
||||
由于 BeamMP 需要与网络进行交互及其他因素,部分杀毒软件可能会将其标记为威胁。但请放心,所有代码中均不含任何病毒。启动器、服务器以及 Lua 客户端的源代码均可在我们的 [GitHub](https://github.com/BeamMP) 页面上找到。
|
||||
|
||||
---
|
||||
|
||||
### **我的游戏性能很差,我该怎么办?**
|
||||
|
||||
我们正在努力使多人游戏体验尽可能稳定。如果您已经降低了图形设置,但性能仍然很差,请考虑在玩家较少的服务器上进行游戏。当你和很多人一起玩游戏时,游戏主要是CPU受限的,所以旧的CPU(甚至是四核)在多人的情况下会受到影响。(一般经验法则:每个CPU线程1辆车)
|
||||
|
||||
---
|
||||
|
||||
## **其他**
|
||||
|
||||
---
|
||||
|
||||
### **我在哪里可以找到代码?**
|
||||
|
||||
所有源代码都可以在我们的[GitHub](https://github.com/BeamMP)上找到。在进行任何更改之前,请记住代码受我们的[使用条款](https://forum.beammp.com/t/terms-of-use-v1-0/43)和许可的约束:
|
||||
|
||||
代码 | 许可证
|
||||
--- | :-:
|
||||
服务器 | [许可证](https://github.com/BeamMP/BeamMP-Server/blob/master/LICENSE)
|
||||
启动器 | [许可证](https://github.com/BeamMP/BeamMP-Launcher/blob/master/LICENSE)
|
||||
客户端 Lua | [许可证](https://github.com/BeamMP/BeamMP/blob/development/LICENSE)
|
||||
|
||||
---
|
||||
|
||||
### **我发现了错误或漏洞,我该怎么办?**
|
||||
|
||||
如果问题与代码相关,并且您知道如何使用Github,请在[ Github ](https://github.com/BeamMP)上的相应存储库中打开一个新的“issue”。我们使用基于问题的工作流程,所以即使你已经修复了bug,也要考虑打开一个新的“Issue”,然后打开一个包含问题解决方案的“Pull Request”。更多关于贡献的信息可以在[中找到](https://github.com/BeamMP/BeamMP/blob/development/CONTRIBUTING.md)。
|
||||
|
||||
如果您没有GitHub帐户,或者您不知道如何使用GitHub,或者您有任何其他问题,您可以通过以下方式与我们联系:
|
||||
|
||||
- 如果不是敏感内容,您可以在我们的[BeamMP 论坛](https://forum.beammp.com)上创建帖子,或者您可以在我们[的官方 Discord](https://discord.gg/beammp)上报告此问题。
|
||||
- 如果信息敏感,您可以直接向我们的[Discord](https://discord.gg/beammp)上的工作人员报告问题。
|
||||
@@ -0,0 +1,25 @@
|
||||
# 2026年3月28日 BeamMP 停机故障常见问题解答(FAQ)
|
||||
|
||||
针对 2026 年 3 月 28 日开始且目前仍在持续的BeamMP停机故障的临时常见问题解答(FAQ)。
|
||||
|
||||
**最后更新于2026年4月1日**
|
||||
|
||||
=== 我需要帮助!我的 BeamMP 启动器无法运行!<br>请尝试重新安装 BeamMP 启动器。具体操作步骤如下:<br><br>1. 访问 [beammp.com](https://beammp.com/)<br>2. 点击 *Download Now(立即下载)*<br>3. 运行安装程序并按照提示进行操作
|
||||
|
||||
```
|
||||
!!! 注意
|
||||
|
||||
截至 2026 年 4 月 1 日,Windows Defender SmartScreen 会将该 MSI 安装程序识别为“未知应用”。
|
||||
|
||||
若要跳过此警告,请点击 *更多信息*,然后点击 *仍要运行*。
|
||||
```
|
||||
|
||||
=== 我需要帮助!我的授权密钥 (authkey) 失效了!<br><br>截至 2026 年 4 月 1 日,Keymaster 和认证系统处于离线状态。这意味着您的 authkeys 将无法正常工作。若要解决此问题,请按照以下步骤操作:<br><br>1. 打开您的 ``ServerConfig.toml`` 文件,或任何存放服务器配置的地方。<br>2. 将 ``Private`` 设置为 ``true``。设置后应如下所示:``Private = true``。<br>3. 这应该能解决 authkey 的失效问题。
|
||||
|
||||
```
|
||||
!!! 注意
|
||||
|
||||
截至 2026 年 4 月 1 日,BeamMP 的认证系统处于离线状态。目前仅支持游客账号(Guest accounts)登录。
|
||||
|
||||
请确保您的服务器已开启游客访问权限。
|
||||
```
|
||||
@@ -0,0 +1,22 @@
|
||||
# 面向玩家的疑难解答
|
||||
|
||||
## 我如何链接我的Discord帐户?
|
||||
|
||||
将你的 Discord 账号与 BeamMP 账号关联是 BeamMP 的一项新功能。<br>要进行此操作,请前往你的 [论坛账户偏好设置](https://forum.beammp.com/my/preferences/account),在 “关联账户(Associated Accounts)” 下连接你的 Discord 账号。(只有当论坛的双重验证(2FA)被禁用时,此选项才会显示。)
|
||||
|
||||
## 我如何获得抢先体验资格?
|
||||
|
||||
提前体验权限(包含紫色名牌及其他福利)可通过以下方式获取:在[Patreon](https://patreon.com/BeamMP)平台购买相应套餐、进行捐赠,或助力我们的Discord服务器。
|
||||
|
||||
## 我已订阅Patreon会员,如何领取专属福利?
|
||||
|
||||
请确保您完成以下操作以自动获得您的福利:
|
||||
|
||||
1. 在 [Patreon](https://www.patreon.com/settings/apps/discord) 上关联你的 Discord 账号,以在 Discord 服务器中获得相应的角色和访问权限。
|
||||
2. 请确保您在Patreon上使用的电子邮件地址与您在[论坛](https://forum.beammp.com/)上使用的BeamMP帐户的电子邮件地址相同。
|
||||
|
||||
请耐心等待,系统同步可能需要几个小时,有时长达12个小时。如果您在完成上述步骤12小时后仍未收到专属福利,请联系BeamMP支持。
|
||||
|
||||
## 我有更多的问题!
|
||||
|
||||
如果您的提问或问题与游戏本体或游玩有关,请参阅[游戏常见问题解答](game-faq.md)。如果您的问题与运行服务器有关,请参阅[服务器常见问题解答](server-faq.md)。否则,请查看[论坛](https://forum.beammp.com/c/faq/35),在那里社区可以提出问题并获得答案。
|
||||
@@ -0,0 +1,89 @@
|
||||
# 常见问题和已知问题
|
||||
|
||||
常见问题和已知bug列表。
|
||||
|
||||
---
|
||||
|
||||
## **服务器**
|
||||
|
||||
---
|
||||
|
||||
### **我怎么设置自己的服务器**
|
||||
|
||||
设置您自己的服务器的所有信息可以在[中找到](https://docs.beammp.com/server/create-a-server/)。
|
||||
|
||||
---
|
||||
|
||||
### **服务器端兼容LINUX吗?**
|
||||
|
||||
我们在这里提供了许多Linux发行版的二进制文件[。如果您的操作系统/发行版没有二进制文件,您可以通过在](https://github.com/BeamMP/BeamMP-Server/releases/latest)[GitHub](https://github.com/BeamMP/BeamMP-Server)上下载源代码来自己编译它,教程可以在中找到[。](https://github.com/BeamMP/BeamMP-Server#build-instructions)
|
||||
|
||||
---
|
||||
|
||||
### **运行BeamMP服务器的最低系统要求是什么?**
|
||||
|
||||
- 内存: 50+ MiB可用(不计算操作系统开销)
|
||||
- CPU: >1GHz, 最好是多核
|
||||
- 操作系统: Windows、Linux(理论上兼容所有POSIX系统)
|
||||
- GPU: 不需要
|
||||
- 硬盘:10 MiB + 模组/插件
|
||||
- 带宽:上传5 ~ 10m /s
|
||||
|
||||
---
|
||||
|
||||
## **局域网外的玩家无法加入我的自托管服务器**
|
||||
|
||||
请查阅[此处](https://docs.beammp.com/server/port-forwarding/)提供的端口转发指南,下文为其关键步骤摘要。若其他玩家通过BeamMP启动器连接您的服务器时出现错误代码10060、10061或10038,请按以下流程排查:
|
||||
|
||||
- 转发端口30814(或在ServerConfig.toml中配置的其他端口),需同时开放TCP与UDP协议。
|
||||
- 请在Windows防火墙中为BeamMP放行入站与出站连接,直接关闭防火墙通常无法解决问题。
|
||||
- 确认你现在没有在使用VPN (这可能是问题的原因).
|
||||
- 确保服务器确实在运行,没有任何错误或警告。
|
||||
|
||||
您可以在服务器运行时使用CheckBeamMP检查您是否成功地进行了端口转发。
|
||||
|
||||
<form action="https://check.beammp.com/api/v2/beammp" method="get" target="_blank">
|
||||
<label for="ip">IP地址:</label>
|
||||
<input type="text" id="ip" name="ip"><br>
|
||||
<label for="port">端口:</label>
|
||||
<input type="text" id="port" name="port"><br>
|
||||
<input type="submit" value="CheckBeamMP">
|
||||
</form>
|
||||
|
||||
注意:
|
||||
|
||||
- 一些互联网提供商不为您的连接(CGNAT)提供专用的IPv4地址,因此端口转发可能不成功,尽管它在路由器中是可以的。
|
||||
- 如果你使用的是移动(4G/5G)互联网连接,端口转发是不可能的。
|
||||
|
||||
---
|
||||
|
||||
### **我可以在服务器列表中看到我的自托管服务器,但我不能自己加入它**
|
||||
|
||||
若服务器与游戏运行于同一台设备,您需通过在直接连接中输入IP地址 127.0.0.1 和服务器端口来加入。若要通过服务器列表加入自托管服务器,您的路由器需支持NAT环回功能,但多数家用路由器未提供此功能。
|
||||
|
||||
---
|
||||
|
||||
## **其他**
|
||||
|
||||
---
|
||||
|
||||
### **我在哪里可以找到源码?**
|
||||
|
||||
所有源代码都可以在我们的[GitHub](https://github.com/BeamMP)上找到。在做任何事情之前,请记住代码受我们的[使用条款](https://forum.beammp.com/t/terms-of-use-v1-0/43)和许可的约束:
|
||||
|
||||
代码 | 许可证
|
||||
--- | :-:
|
||||
服务器 | [许可证](https://github.com/BeamMP/BeamMP-Server/blob/master/LICENSE)
|
||||
启动器 | [许可证](https://github.com/BeamMP/BeamMP-Launcher/blob/master/README.md)
|
||||
客户端 Lua | [许可证](https://github.com/BeamMP/BeamMP/blob/development/LICENSE.md)
|
||||
|
||||
---
|
||||
|
||||
### **我发现了一个bug或漏洞,我应该怎么做?**
|
||||
|
||||
如果问题与代码相关,并且您知道如何使用Github,请在[ Github ](https://github.com/BeamMP)上的适当存储库中创建一个新的“issue”。我们使用基于问题的工作流程,所以即使你已经修复了bug,也可以考虑打开一个新的“Issue”,然后请求一个“Pull Request”来解决你的“问题”。更多关于贡献的信息可以在[中找到](https://github.com/BeamMP/BeamMP/blob/development/CONTRIBUTING.md)。
|
||||
|
||||
如果您没有GitHub帐户或者您不知道如何使用GitHub,您可以通过以下方式与我们联系:
|
||||
|
||||
- 如果问题不涉及隐私或安全,您可以在我们的[BeamMP论坛](https://forum.beammp.com)发帖反馈,或前往[官方Discord服务器](https://discord.gg/beammp)提交报告。
|
||||
- 如果信息敏感,您可以直接向我们的[Discord](https://discord.gg/beammp)上的工作人员报告问题。
|
||||
@@ -0,0 +1,25 @@
|
||||
# 我怎样才能找到我服务器的IP ?
|
||||
|
||||
## 对于VPS托管服务器
|
||||
|
||||
如果您使用的我们的合作托管服务之一的托管服务器,其IP地址将显示在对应服务商的服务器管理界面中。您还可以在[Keymaster](https://keymaster.beammp.com/login)网站上找到服务器的IP。
|
||||
|
||||
## 对于家庭托管服务器
|
||||
|
||||
对于家庭自托管服务器,请在浏览器中访问[whatsmyip.org](https://whatsmyip.org),该网站将显示互联网访问您时所使用的公网IPv4地址。
|
||||
|
||||
注意,127.0.0.1是本地主机地址,如果服务器托管在同一台计算机上,则只能由您自己使用。如果您与家庭托管服务器的连接仍然有问题,请检查[端口转发](https://docs.beammp.com/server/port-forwarding/)以及使用CheckBeamMP
|
||||
|
||||
<form action="https://check.beammp.com/api/v2/beammp" method="get" target="_blank">
|
||||
<label for="ip">IP地址:</label>
|
||||
<input type="text" id="ip" name="ip"><br>
|
||||
<label for="port">端口:</label>
|
||||
<input type="text" id="port" name="port"><br>
|
||||
<input type="submit" value="CheckBeamMP">
|
||||
</form>
|
||||
|
||||
## 怎么检查CGNAT?
|
||||
|
||||
请查看[这个页面](https://docs.beammp.com/FAQ/How-to-check-for-CGNAT/),以确定您是否可以在家中托管服务器。
|
||||
|
||||
标签: IP, Server, Connection Failed, 10060/10061
|
||||
@@ -0,0 +1,12 @@
|
||||
!!! warning "本页面正在建设中!"
|
||||
|
||||
```
|
||||
本站点目前正处于积极开发与维护阶段。
|
||||
|
||||
觉得您可以提供帮助?请点击页面右侧的铅笔图标参与编辑!
|
||||
此操作适用于站内的任何页面。
|
||||
```
|
||||
|
||||
# BeamNG.drive CEF Code 的片段
|
||||
|
||||
to-do
|
||||
@@ -0,0 +1,189 @@
|
||||
!!! warning "本页面正在建设中!"
|
||||
|
||||
```
|
||||
本站点目前正处于积极开发与维护阶段。
|
||||
|
||||
觉得您可以提供帮助?请点击页面右侧的铅笔图标参与编辑!
|
||||
此操作适用于站内的任何页面。
|
||||
```
|
||||
|
||||
# BeamNG.drive CSS Code 的片段
|
||||
|
||||
## 常见变量
|
||||
|
||||
=== BeamNG Orange
|
||||
|
||||
```
|
||||
```css
|
||||
var(--bng-orange) /*Common orange*/
|
||||
var(--bng-orange-shade1) /*70% opacity*/
|
||||
var(--bng-orange-shade2) /*40% opacity*/
|
||||
var(--bng-orange-shade1opaque)
|
||||
var(--bng-orange-shade2opaque)
|
||||
```
|
||||
```
|
||||
|
||||
=== Monochrome
|
||||
|
||||
```
|
||||
```css
|
||||
--- Monochrome
|
||||
var(--bng-black-8) /*80% opacity (duplicate --bng-black-o8)*/
|
||||
var(--bng-black-6) /*60% opacity (duplicate --bng-black-o6)*/
|
||||
var(--bng-black-4) /*40% opacity (duplicate --bng-black-o4)*/
|
||||
var(--bng-black-2) /*20% opacity (duplicate --bng-black-o2)*/
|
||||
|
||||
var(--dark-neutral-grey)
|
||||
var(--neutral-grey)
|
||||
var(--light-neutral-grey)
|
||||
var(--dark-grey)
|
||||
var(--dark-grey-alpha) /*80% opacity*/
|
||||
|
||||
var(--black-1) /*70% opacity*/
|
||||
var(--black-2) /*40% opacity (duplicate --bng-black-o4)*/
|
||||
|
||||
var(--white-1) /*80% opacity*/
|
||||
var(--white-2) /*40% opacity*/
|
||||
var(--white-3) /*20% opacity*/
|
||||
```
|
||||
```
|
||||
|
||||
=== BeamNG 界面颜色调色板
|
||||
|
||||
```
|
||||
=== Orange
|
||||
|
||||
```css
|
||||
var(--bng-orange-50)
|
||||
var(--bng-orange-100)
|
||||
var(--bng-orange-200)
|
||||
var(--bng-orange-300)
|
||||
var(--bng-orange-b400)
|
||||
var(--bng-orange-500)
|
||||
var(--bng-orange-600)
|
||||
var(--bng-orange-700)
|
||||
var(--bng-orange-800)
|
||||
var(--bng-orange-900)
|
||||
```
|
||||
|
||||
=== Cool Gray
|
||||
|
||||
```css
|
||||
var(--bng-cool-gray-50)
|
||||
var(--bng-cool-gray-100)
|
||||
var(--bng-cool-gray-200)
|
||||
var(--bng-cool-gray-300)
|
||||
var(--bng-cool-gray-400)
|
||||
var(--bng-cool-gray-500)
|
||||
var(--bng-cool-gray-600)
|
||||
var(--bng-cool-gray-700)
|
||||
var(--bng-cool-gray-800)
|
||||
var(--bng-cool-gray-900)
|
||||
```
|
||||
|
||||
=== Ter Blue
|
||||
```css
|
||||
var(--bng-ter-blue-50)
|
||||
var(--bng-ter-blue-100)
|
||||
var(--bng-ter-blue-200)
|
||||
var(--bng-ter-blue-300)
|
||||
var(--bng-ter-blue-400)
|
||||
var(--bng-ter-blue-500)
|
||||
var(--bng-ter-blue-600)
|
||||
var(--bng-ter-blue-700)
|
||||
var(--bng-ter-blue-800)
|
||||
var(--bng-ter-blue-900)
|
||||
```
|
||||
|
||||
=== Add Blue
|
||||
```css
|
||||
var(--bng-add-blue-50)
|
||||
var(--bng-add-blue-100)
|
||||
var(--bng-add-blue-200)
|
||||
var(--bng-add-blue-300)
|
||||
var(--bng-add-blue-400)
|
||||
var(--bng-add-blue-500)
|
||||
var(--bng-add-blue-600)
|
||||
var(--bng-add-blue-700)
|
||||
var(--bng-add-blue-800)
|
||||
var(--bng-add-blue-900)
|
||||
```
|
||||
|
||||
=== Add Green
|
||||
```css
|
||||
var(--bng-add-green-50)
|
||||
var(--bng-add-green-100)
|
||||
var(--bng-add-green-200)
|
||||
var(--bng-add-green-300)
|
||||
var(--bng-add-green-400)
|
||||
var(--bng-add-green-500)
|
||||
var(--bng-add-green-600)
|
||||
var(--bng-add-green-700)
|
||||
var(--bng-add-green-800)
|
||||
var(--bng-add-green-900)
|
||||
```
|
||||
|
||||
=== Add Yellow
|
||||
```css
|
||||
var(--bng-add-yellow-50)
|
||||
var(--bng-add-yellow-100)
|
||||
var(--bng-add-yellow-200)
|
||||
var(--bng-add-yellow-300)
|
||||
var(--bng-add-yellow-400)
|
||||
var(--bng-add-yellow-500)
|
||||
var(--bng-add-yellow-600)
|
||||
var(--bng-add-yellow-700)
|
||||
var(--bng-add-yellow-800)
|
||||
var(--bng-add-yellow-900)
|
||||
```
|
||||
|
||||
=== Add Peach
|
||||
```css
|
||||
var(--bng-add-peach-50)
|
||||
var(--bng-add-peach-100)
|
||||
var(--bng-add-peach-200)
|
||||
var(--bng-add-peach-300)
|
||||
var(--bng-add-peach-400)
|
||||
var(--bng-add-peach-500)
|
||||
var(--bng-add-peach-600)
|
||||
var(--bng-add-peach-700)
|
||||
var(--bng-add-peach-800)
|
||||
var(--bng-add-peach-900)
|
||||
```
|
||||
|
||||
=== Add Red
|
||||
```css
|
||||
var(--bng-add-red-50)
|
||||
var(--bng-add-red-100)
|
||||
var(--bng-add-red-200)
|
||||
var(--bng-add-red-300)
|
||||
var(--bng-add-red-400)
|
||||
var(--bng-add-red-500)
|
||||
var(--bng-add-red-600)
|
||||
var(--bng-add-red-700)
|
||||
var(--bng-add-red-800)
|
||||
var(--bng-add-red-900)
|
||||
```
|
||||
```
|
||||
|
||||
=== 额外颜色预设
|
||||
|
||||
```
|
||||
```css
|
||||
var(--bng-filter-orange) /*Filter preset to force SVGs to use bng-orange*/
|
||||
var(--bng-black-o8) /*80% opacity*/
|
||||
var(--bng-black-o6) /*60% opacity*/
|
||||
var(--bng-black-o4) /*40% opacity*/
|
||||
var(--bng-black-o2) /*20% opacity*/
|
||||
```
|
||||
```
|
||||
|
||||
=== 圆角预设
|
||||
|
||||
```
|
||||
```css
|
||||
var(--bng-corners-1) /*0.25rem*/
|
||||
var(--bng-corners-2) /*0.50rem*/
|
||||
var(--bng-corners-3) /*1.00rem*/
|
||||
```
|
||||
```
|
||||
@@ -0,0 +1,21 @@
|
||||
!!!警告“此网站正在建设中!”
|
||||
|
||||
```
|
||||
这个网站正在积极建设中。
|
||||
|
||||
觉得你能帮忙吗?请用右边的铅笔点击页面!
|
||||
|
||||
这也可以在任何页面上完成。
|
||||
```
|
||||
|
||||
# 车祸模拟器 创建车辆
|
||||
|
||||
。。。
|
||||
|
||||
## 介绍
|
||||
|
||||
。。。
|
||||
|
||||
## 开始进行
|
||||
|
||||
。。。
|
||||
@@ -0,0 +1,88 @@
|
||||
!!! warning "本页面正在建设中!"
|
||||
|
||||
```
|
||||
本站点目前正处于积极开发与维护阶段。
|
||||
|
||||
觉得您可以提供帮助?请点击页面右侧的铅笔图标参与编辑!
|
||||
此操作适用于站内的任何页面。
|
||||
|
||||
#创建 ImGui 窗口
|
||||
```
|
||||
|
||||
本页将介绍如何创建一个基础的 ImGui 窗口。
|
||||
|
||||
## 设置
|
||||
|
||||
在开始使用 ImGui 之前,需要进行一些基础设置:
|
||||
|
||||
```lua
|
||||
local im = ui_imgui -- 缩写以避免频繁查找。这有助于性能优化
|
||||
local imguiExampleWindowOpen = im.BoolPtr(true)
|
||||
```
|
||||
|
||||
`imguiExampleWindowOpen` 将用于决定该示例窗口是否应当进行渲染。
|
||||
|
||||
## 窗口渲染
|
||||
|
||||
ImGui 窗口及其内容必须在每一个需要显示的帧中重新创建。这意味着,若要使用 ImGui,必须通过某种形式的onUpdate函数来实现。
|
||||
|
||||
```lua
|
||||
local function onUpdate()
|
||||
if worldReadyState == 2 then
|
||||
if imguiExampleWindowOpen[0] == true then
|
||||
imguiExample()
|
||||
end
|
||||
end
|
||||
end
|
||||
M.onUpdate = onUpdate
|
||||
```
|
||||
|
||||
只要关卡已完全加载,且示例窗口处于应当显示的状态,这段代码就会运行一个函数来创建该示例窗口。
|
||||
|
||||
## 窗口内容
|
||||
|
||||
如果您是初次编写 ImGui,可以把ImGui看作 HTML 的亲戚:
|
||||
|
||||
- `im.SetNextWindowSize(im.ImVec2(x, y), im.Cond_FirstUseEver)` 用于在尚未定义视口尺寸的情况下,对其进行初始化定义。
|
||||
- `im.Begin()` 和 `im.End()`相当于你的 `<body>` 和 `</body>`
|
||||
- `im.Text()` 相当于你的 `<p></p>`
|
||||
|
||||
```lua
|
||||
local buttonPresses = 0
|
||||
|
||||
local function imguiExample()
|
||||
im.SetNextWindowSize(im.ImVec2(366, 100), im.Cond_FirstUseEver) -- 准备窗口尺寸
|
||||
im.Begin("Hello World, I am a window") -- 创建一个标题为“Hello World, I am a window”的窗口
|
||||
im.Indent() -- 缩进元素(类似于内边距)
|
||||
im.Text("Hello World, I am text.") -- 添加一行文本,类似于 <p> 标签
|
||||
im.SameLine() -- 与 HTML 不同,这会将下一个元素附加到上一个元素的同一行
|
||||
if im.Button("The Hello World Button") then -- 类似于 <button>。点击时运行 Lua 代码
|
||||
buttonPresses = buttonPresses + 1
|
||||
end
|
||||
if buttonPresses > 0 then
|
||||
im.Text("The Hello World Button has been pressed " .. buttonPresses .. " times!")
|
||||
else
|
||||
im.Text("The Hello World Button has not been pressed.")
|
||||
end
|
||||
im.Unindent() -- 结束缩进
|
||||
im.End() -- 完成“画布”以便进行渲染
|
||||
end
|
||||
```
|
||||
|
||||
您可以添加以下函数,以便轻松切换窗口的可见性:
|
||||
|
||||
```lua
|
||||
local function toggleExampleImgui()
|
||||
imguiExampleWindowOpen[0] = not imguiExampleWindowOpen[0]
|
||||
end
|
||||
```
|
||||
|
||||
## 结果
|
||||
|
||||
<figure class="image image_resized" style="width:100%" markdown="">  </figure>
|
||||
|
||||
当The Hello World Button按钮被按下时,其下方的计数器将更新,并显示The Hello World Button按钮被按下的次数。
|
||||
|
||||
## 下载
|
||||
|
||||
本教程几乎完全基于 [StanleyDudek](https://github.com/StanleyDudek) 的 ImGui 示例模组(Mod)。您可以从[此处](../../../../assets/content/imguiExample.zip)下载该示例模组。
|
||||
@@ -0,0 +1,3 @@
|
||||
# imgui-windows.md
|
||||
|
||||
此页面需要创建。
|
||||
@@ -0,0 +1,3 @@
|
||||
# lua-mods.md
|
||||
|
||||
此页面需要创建。
|
||||
@@ -0,0 +1,273 @@
|
||||
# 图形界面-应用程序 创建
|
||||
|
||||
为了制作一个图形界面应用程序,你需要一些AngularJS框架的知识,主要的文档可以在这里找到: [AngularJS docs](https://docs.angularjs.org/guide)
|
||||
|
||||
## 文件结构
|
||||
|
||||
一个图形界面应用程序需要四个重要的文件才能工作:
|
||||
|
||||
- app.js | 包含图形界面应用程序使用的主要代码 [Javascript docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript)
|
||||
- app.html | 显示应用程序的代码 [Html docs](https://developer.mozilla.org/fr/docs/Web/HTML)
|
||||
- app.json | 包含图形界面应用程序的信息
|
||||
- app.png | 显示在应用程序选择器中的图像文件
|
||||
|
||||
### 图形界面应用程序 样式
|
||||
|
||||
我们建议使用 `<style>` 标签来设置应用的样式, a .css 文件会工作,但您将无法实时看到更改。
|
||||
|
||||
## 范例
|
||||
|
||||
这个例子来自DanielW,感谢他
|
||||
|
||||
ui\modules\apps\ExampleApp\app.html
|
||||
|
||||
```html
|
||||
<div style="width: 100%; height: 100%;" class="bngApp">
|
||||
<link type="text/css" rel="stylesheet" href="/ui/modules/apps/ExampleApp/app.css" />
|
||||
|
||||
<div id="exampleAppContainer">
|
||||
<span>Gear: <span>{{ gearName }}</span></span>
|
||||
|
||||
<div layout="row" layout-align="center center">
|
||||
<md-input-container flex>
|
||||
<label>Input</label>
|
||||
<input ng-model="message" ng-keydown="sendMessage($event)">
|
||||
</md-input-container>
|
||||
|
||||
<md-button md-no-ink class="md-warn" ng-disabled="!message" ng-click="sendMessage()">Send</md-button>
|
||||
</div>
|
||||
|
||||
<span style="display: block">Messages:</span>
|
||||
|
||||
<!-- Scroll Area -->
|
||||
<ul bng-nav-scroll style="margin: 0; padding: 0; overflow-y: auto; width: 100%; height: 100%; background-color: #37373740;">
|
||||
|
||||
<!-- Iterate over the messages and display them -->
|
||||
<li ng-repeat="message in messages track by $index" style="display: flex; align-items: center; height: 35px;">
|
||||
<span style="padding: 0 0.2em; width: 100%;">{{ message }}</span>
|
||||
|
||||
<!-- Button to delete the message, this calls the `deleteMessage` function in `app.js` -->
|
||||
<md-button md-no-ink class="md-icon-button md-warn" ng-click="deleteMessage($index)">
|
||||
<md-icon class="material-icons">delete</md-icon>
|
||||
</md-button>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
```
|
||||
|
||||
在这里, 你可以看到一个 `<span>` 显示车辆挡位的标签, 用于将消息发送给 `sendMessage()`函数和一个重复的`<li>`标签(在Javascript中的`messages`变量上使用<b>ng-repeat</b>)
|
||||
|
||||
ui\modules\apps\ExampleApp\app.js
|
||||
|
||||
```js
|
||||
angular.module('beamng.apps')
|
||||
.directive('exampleApp', [function() {
|
||||
return {
|
||||
templateUrl: '/ui/modules/apps/ExampleApp/app.html',
|
||||
replace: true,
|
||||
restrict: 'EA',
|
||||
scope: true,
|
||||
|
||||
controller: ['$scope', function($scope) {
|
||||
$scope.gearName = '0'
|
||||
$scope.message = ''
|
||||
$scope.messages = []
|
||||
|
||||
// Setup the streams we want. For now, we only want the engine information. You can add more, you'll just have to look around to find the different streams
|
||||
let steamList = ['engineInfo']
|
||||
StreamsManager.add(steamList)
|
||||
|
||||
$scope.$on('destroy', function() {
|
||||
StreamsManager.remove(steamList)
|
||||
})
|
||||
|
||||
// Do I even need to put this comment here explaining what this function does?
|
||||
// Well, I have done it for a lot of other things when they weren't needed. I'll leave this one be...
|
||||
$scope.$on('streamsUpdate', function(event, streams) {
|
||||
if (!streams.engineInfo) // Early return... You probably noticed that without this useless comment though
|
||||
return;
|
||||
|
||||
// `lua/vehicle/controller/vehicleController.lua:538` (or use console.log)
|
||||
let gear = streams.engineInfo[5]
|
||||
|
||||
// Update the gear name in HTML if needed
|
||||
if ($scope.gearName !== gear)
|
||||
$scope.gearName = gear
|
||||
})
|
||||
|
||||
$scope.sendMessage = function(event) {
|
||||
if (event && event.key !== 'Enter')
|
||||
return
|
||||
|
||||
if ($scope.message == '')
|
||||
return
|
||||
|
||||
// Forward the message to the Lua extension to modify it
|
||||
bngApi.engineLua('extensions.exampleMod.modifyMessage("' + $scope.message + '")')
|
||||
$scope.message = ''
|
||||
}
|
||||
|
||||
$scope.deleteMessage = function(idx) {
|
||||
$scope.messages.splice(idx, 1)
|
||||
}
|
||||
|
||||
// The `modifyMessage` function will call this hook with the modified data
|
||||
$scope.$on('MessageReady', function(_, modifiedMessage) {
|
||||
$scope.messages.push(modifiedMessage)
|
||||
});
|
||||
}]
|
||||
}
|
||||
}])
|
||||
```
|
||||
|
||||
注意<b>$scope{/b0}的用法。这是非常重要的,因为你需要在{b1}$作用域</b>中定义变量和函数,以便能够从<b>ng-*</b>标签中的<b>Html</b>中访问它。所以在这个例子中,在<b>Html</b>中执行`sendMessage()`函数后,它将把它发送到mod的extensions目录中的lua文件中,并在这个lua文件中执行`modifyMessage()`函数。
|
||||
|
||||
下面是lua的一个例子:
|
||||
|
||||
```lua
|
||||
local function modifyMessage(message)
|
||||
message = message .. " [Modified!]"
|
||||
guihooks.trigger('MessageReady', message)
|
||||
end
|
||||
```
|
||||
|
||||
^这是lua的一个简化版本,只是为了展示函数
|
||||
|
||||
这里主要关注的是<b>基钩子的使用。触发器</b>触发一个用`$scope.$on()`定义的AngularJS事件。正如您在Javascript文件的最底部看到的那样,该事件被命名为MessageReady,并将由<b>guihook执行。用消息有效负载触发</b>函数,然后将被推入`$范围。在<b data-md-type="raw_html">Html</b>文件中使用<b data-md-type="raw_html">ng-repeat</b>来显示li标签中的messages`变量
|
||||
|
||||
完整的lua文件就在下面
|
||||
|
||||
lua\ge\extensions\exampleMod.lua
|
||||
|
||||
```lua
|
||||
local M = {}
|
||||
|
||||
--[[
|
||||
This is the entry point of our extension, this is what the game loads from our `modScript.lua`.
|
||||
In the modScript file, you can load more extensions and put them in the same directory as this file.
|
||||
|
||||
In this file, we will communicate with the following:
|
||||
1. Our vehicle extension. That extension tells this extension when to send it data, and we send it. Take a look at `vehicle/extensions/auto/exampleVehicleExtension.lua`
|
||||
2. Input. Take a look at `core/input/actions/myActions.json`. When the bounded key is pressed, it will call `onActionKeyDown` (a function we export below)
|
||||
]]
|
||||
|
||||
-- Game Function Hooks
|
||||
--------------------------------------------
|
||||
local function onExtensionLoaded()
|
||||
log('D', "onExtensionLoaded", "Called")
|
||||
end
|
||||
|
||||
local function onExtensionUnloaded()
|
||||
log('D', "onExtensionUnloaded", "Called")
|
||||
end
|
||||
|
||||
-- Custom Functions
|
||||
--------------------------------------------
|
||||
local function onActionKeyDown()
|
||||
log('D', "onActionKeyDown", "Pressed!")
|
||||
end
|
||||
|
||||
local function onVehicleExtensionLoaded(vehID)
|
||||
log('D', "onVehicleExtensionLoaded", "Sending some data to the vehicle")
|
||||
|
||||
local veh = be:getObjectByID(vehID) -- If you don't have the ID, you can also use `be:getPlayerVehicle(0)` to get the current vehicle.
|
||||
if not veh then return end -- The usual error checking
|
||||
|
||||
local data = {
|
||||
["name"] = "Daniel W"
|
||||
}
|
||||
|
||||
veh:queueLuaCommand("extensions.exampleVehicleExtension.onDataReceived('" .. jsonEncode(data) .. "')")
|
||||
end
|
||||
|
||||
local function modifyMessage(message)
|
||||
message = message .. " [Modified!]"
|
||||
guihooks.trigger('MessageReady', message)
|
||||
end
|
||||
|
||||
-- Export Interface
|
||||
--------------------------------------------
|
||||
M.onExtensionLoaded = onExtensionLoaded
|
||||
M.onExtensionUnloaded = onExtensionUnloaded
|
||||
|
||||
M.onActionKeyDown = onActionKeyDown
|
||||
M.onVehicleExtensionLoaded = onVehicleExtensionLoaded
|
||||
M.modifyMessage = modifyMessage
|
||||
|
||||
--[[ Other functions could include:
|
||||
- onPreRender(dtReal, dtSim, dtRaw)
|
||||
- onUpdate(dtReal, dtSim, dtRaw)
|
||||
- onClientPreStartMission(levelPath)
|
||||
- onClientPostStartMission(levelPath)
|
||||
|
||||
To find all of these, search the following in `BeamNG.Drive/lua`: `extensions.hook(`
|
||||
--]]
|
||||
|
||||
return M
|
||||
```
|
||||
|
||||
请注意,返回包含所需函数的M(模块)变量非常重要!例如,如果没有`M。modifyMessage = modifyMessage`行,`bngApi.engineLua(‘extensions.exampleMod. ’modifyMessage(' + $scope. ')message + ' ') ')`函数将无法找到modifyMessage()函数
|
||||
|
||||
ui\modules\apps\ExampleApp\app.css
|
||||
|
||||
```css
|
||||
#exampleAppContainer {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
align-content: center;
|
||||
}
|
||||
|
||||
#exampleAppContainer > * {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
```
|
||||
|
||||
ui\modules\apps\ExampleApp\app.json
|
||||
|
||||
```json
|
||||
{
|
||||
"domElement": "<example-app></example-app>",
|
||||
"name": "Example App",
|
||||
"types": [
|
||||
"ui.apps.categories.debug"
|
||||
],
|
||||
"description": "example-app",
|
||||
"css": {
|
||||
"left": "0px",
|
||||
"height": "auto",
|
||||
"width": "270px",
|
||||
"min-width": "200px",
|
||||
"min-height": "90px",
|
||||
"top": "0px"
|
||||
},
|
||||
"author": "Daniel W",
|
||||
"version": "0.1",
|
||||
"directive": "exampleApp"
|
||||
}
|
||||
```
|
||||
|
||||
该指令需要与<b>Javascript</b>文件中的指令相同
|
||||
|
||||
# BeamNG为图形界面应用程序提供的Javascript函数
|
||||
|
||||
```js
|
||||
bngApi.engineLua("lua_path.function()")
|
||||
```
|
||||
|
||||
用于运行带或不带参数的lua函数
|
||||
|
||||
# BeamNG为图形界面应用程序提供的Lua函数
|
||||
|
||||
```lua
|
||||
guihooks.trigger("EventName", Payload)
|
||||
```
|
||||
|
||||
有效载荷可以是任何类型,但最好将其保留为数组/对象或字符串,以免丢失。
|
||||
|
||||
<b>IMPORTANT</b>:有时候,你使用的事件名称可能已经在内部被其他东西使用了,从而导致问题,因此,如果你的应用名为Nickel,那么最好将你的每个Angular事件命名为NKEventName,而不是EventName
|
||||
@@ -0,0 +1,83 @@
|
||||
!!! warning "本页面正在建设中!"
|
||||
|
||||
```
|
||||
本站点目前正处于积极开发与维护阶段。
|
||||
|
||||
觉得您可以提供帮助?请点击页面右侧的铅笔图标参与编辑!
|
||||
此操作适用于站内的任何页面。
|
||||
```
|
||||
|
||||
# BeamNG.drive ImGui Code 的片段
|
||||
|
||||
## 配置
|
||||
|
||||
### 配置 ImGui
|
||||
|
||||
```lua
|
||||
local im = ui_imgui
|
||||
```
|
||||
|
||||
### 配置 Window
|
||||
|
||||
```lua
|
||||
im.SetNextWindowSize(im.ImVec2(366, 100), im.Cond_FirstUseEver)
|
||||
```
|
||||
|
||||
### 创建 window
|
||||
|
||||
```lua
|
||||
im.Begin("Window Title") -- Create window
|
||||
im.End()
|
||||
```
|
||||
|
||||
## 一般演示
|
||||
|
||||
=== 基本格式
|
||||
|
||||
```
|
||||
```lua
|
||||
im.Text("") -- 普通文本
|
||||
im.TextWrapped("") -- 自动换行文本
|
||||
im.TextColored(im.ImVec4(0,1,0,1), "") -- 彩色文本(参数为 R,G,B,A)
|
||||
im.TextDisabled("") -- 禁用状态样式的文本(预设样式)
|
||||
|
||||
im.LabelText("", "") -- 带标签的文本
|
||||
im.BulletText("") -- 带项目符号(圆点)的文本
|
||||
im.SeparatorText("") -- 带中间文字的分隔线
|
||||
|
||||
im.Separator() -- 分隔线(在添加前可能需要换行)
|
||||
im.SameLine() -- 将下一个元素水平附加到上一个元素之后
|
||||
im.NewLine() -- 换行
|
||||
|
||||
im.Spacing() -- 微小间距(填充)
|
||||
im.Indent() -- 缩进
|
||||
im.Unindent() -- 取消缩进
|
||||
```
|
||||
```
|
||||
|
||||
=== 输入
|
||||
|
||||
```
|
||||
```lua
|
||||
im.Button("", im.ImVec2(0,0)) -- 按钮(0 = 自动适应内容大小)
|
||||
im.SmallButton("") -- 小按钮(适应内容且内边距更小)
|
||||
im.ArrowButton("", 0) -- 箭头按钮(参数1:字符串实际未被使用?参数2:0=左,1=右,2=上,3=下)
|
||||
im.InvisibleButton("", im.ImVec2(0,0), ...) -- 不可见按钮(用于 ImGui 光标定位?)
|
||||
|
||||
im.Checkbox("", im.BoolPtr(false)) -- 复选框
|
||||
|
||||
im.RadioButton1("", im.BoolPtr(false)) -- 单选框 1
|
||||
im.RadioButton2("", im.IntPtr(), 0) -- 单选框 2(参数3:0 或 1,分别代表禁用或启用状态)
|
||||
```
|
||||
```
|
||||
|
||||
=== 其他
|
||||
|
||||
```
|
||||
```lua
|
||||
im.Bullet()
|
||||
|
||||
im.ProgressBar(0.5, im.ImVec2(0,0), "") -- 进度条(参数 2:填 0 则使用默认宽度和/或高度)
|
||||
im.TextUnformatted("", "") -- 非格式化文本(第二个参数似乎会导致游戏崩溃)
|
||||
```
|
||||
```
|
||||
@@ -0,0 +1,11 @@
|
||||
# 欢迎来到 BeamNG.drive 文档
|
||||
|
||||
本文档是非官方的,由BeamMP模组团队和BeamNG社区制作。
|
||||
|
||||
## 了解文件结构
|
||||
|
||||
...
|
||||
|
||||
## 片段
|
||||
|
||||
对您可能有用的代码片段可以在这里找到: [Lua Snippets](lua-snippets.md)
|
||||
@@ -0,0 +1,346 @@
|
||||
!!! warning "本页面正在建设中!"
|
||||
|
||||
```
|
||||
本站点目前正处于积极开发与维护阶段。
|
||||
|
||||
觉得您可以提供帮助?请点击页面右侧的铅笔图标参与编辑!
|
||||
此操作适用于站内的任何页面。
|
||||
```
|
||||
|
||||
# BeamNG.drive Lua Code 的片段
|
||||
|
||||
## 世界
|
||||
|
||||
### 绘制标记&车辆检测
|
||||
|
||||
在地图上绘制标记是告知用户该处存在某种交互形式的最佳方式之一。
|
||||
|
||||
绘制标记相当简单。以下是巴士路线标记绘制方式的一个示例:
|
||||
|
||||
```lua
|
||||
local function createBusMarker(markerName)
|
||||
local marker = createObject('TSStatic')
|
||||
marker:setField('shapeName', 0, "art/shapes/interface/position_marker.dae")
|
||||
marker:setPosition(vec3(0, 0, 0))
|
||||
marker.scale = vec3(1, 1, 1)
|
||||
marker:setField('rotation', 0, '1 0 0 0')
|
||||
marker.useInstanceRenderData = true
|
||||
marker:setField('instanceColor', 0, '1 1 1 0')
|
||||
marker:setField('collisionType', 0, "Collision Mesh") -- 碰撞类型:碰撞网格
|
||||
marker:setField('decalType', 0, "Collision Mesh") -- 贴花类型:碰撞网格
|
||||
marker:setField('playAmbient', 0, "1") -- 播放环境动画
|
||||
marker:setField('allowPlayerStep', 0, "1") -- 允许玩家踏上
|
||||
marker:setField('canSave', 0, "0") -- 是否可保存
|
||||
marker:setField('canSaveDynamicFields', 0, "1") -- 是否可保存动态字段
|
||||
marker:setField('renderNormals', 0, "0") -- 渲染法线
|
||||
marker:setField('meshCulling', 0, "0") -- 网格剔除
|
||||
marker:setField('originSort', 0, "0")
|
||||
marker:setField('forceDetail', 0, "-1")
|
||||
marker.canSave = false
|
||||
marker:registerObject(markerName)
|
||||
scenetree.MissionGroup:addObject(marker)
|
||||
return marker
|
||||
end
|
||||
|
||||
-- 随后可以在循环中调用此函数来设置您的标记。
|
||||
-- 注意:您应该只在初始化设置时执行一次,而不是在每一帧都调用。
|
||||
if #markers == 0 then
|
||||
for k,v in pairs(nameMarkers) do
|
||||
local mk = scenetree.findObject(v)
|
||||
if mk == nil then
|
||||
log('I', logTag,'Creating marker '..tostring(v)) -- 正在创建标记...
|
||||
mk = createBusMarker(v)
|
||||
ScenarioObjectsGroup:addObject(mk.obj)
|
||||
end
|
||||
table.insert(markers, mk)
|
||||
end
|
||||
end
|
||||
```
|
||||
|
||||
这是来自 [BeamNG-FuelStations](https://github.com/BeamMP/BeamNG-FuelStations/tree/master) 的自定义标记示例:
|
||||
|
||||
```lua
|
||||
local stations = [
|
||||
{ "location": [ -778.813, 485.973, 23.46 ], "type":"gas" }, -- 燃油站
|
||||
{ "location": [ 617.164, -192.107, 53.2 ], "type":"ev" }, -- 充电站
|
||||
]
|
||||
|
||||
-- 检查实体是否在区域内
|
||||
local function IsEntityInsideArea(pos1, pos2, radius)
|
||||
return pos1:distance(pos2) < radius
|
||||
end
|
||||
|
||||
local onUpdate = function (dt)
|
||||
for k, spot in pairs(stations) do -- 遍历当前地图上的所有站点
|
||||
local bottomPos = vec3(spot.location[1], spot.location[2], spot.location[3])
|
||||
local topPos = bottomPos + vec3(0,0,2) -- 偏移向量以获得顶部位置(2米高)
|
||||
|
||||
local spotInRange = false -- 站点是否在范围内?用于颜色判定
|
||||
local spotCompatible = false -- 站点是否匹配(燃料类型)?
|
||||
|
||||
if activeVeh then -- 如果存在车辆且属于当前玩家(若在多人模式下)
|
||||
local vehPos = activeVeh:getPosition()
|
||||
|
||||
-- 检查车辆是否在站点 1.5 米范围内
|
||||
spotInRange = IsEntityInsideArea(vec3(vehPos.x, vehPos.y,vehPos.z), bottomPos, 1.5)
|
||||
|
||||
-- 检查燃料类型是否匹配
|
||||
spotCompatible = activeFuelType == "any" or spot.type == "any" or activeFuelType == spot.type
|
||||
end
|
||||
|
||||
-- 确定站点颜色:如果范围内且匹配,则使用活动颜色,否则使用非活动颜色或默认半透明白色
|
||||
local spotColor = (spotInRange and spotCompatible) and activeColorMap[spot.type] or inactiveColorMap[spot.type] or ColorF(1,1,1,0.5)
|
||||
|
||||
-- 绘制圆柱体:底部位置,顶部位置,半径,颜色
|
||||
debugDrawer:drawCylinder(bottomPos:toPoint3F(), topPos:toPoint3F(), 1, spotColor)
|
||||
end
|
||||
end
|
||||
```
|
||||
|
||||
## 用户界面
|
||||
|
||||
### 屏幕右上角弹出的通知
|
||||
|
||||
<figure class="image image_resized" style="width:75%" markdown="">  </figure>
|
||||
|
||||
```lua
|
||||
--guihooks.trigger('toastrMsg', {type, title, msg, config = {timeOut}})
|
||||
guihooks.trigger('toastrMsg', {type = "info", title = "Info Message:", msg = "Info Message Text Here", config = {timeOut = 5000}})
|
||||
guihooks.trigger('toastrMsg', {type = "warning", title = "Warning Message:", msg = "Warning Message Text Here", config = {timeOut = 5000}})
|
||||
guihooks.trigger('toastrMsg', {type = "error", title = "Error Message:", msg = "Error Message Text Here", config = {timeOut = 5000}})
|
||||
```
|
||||
|
||||
### 消息通知,默认显示在消息应用的屏幕左上角
|
||||
|
||||
这需要安装“消息”或“消息与任务”UI 应用。图标可以在此处找到: `ui\ui-vue\src\assets\fonts\bngIcons\svg这需要安装“消息”或“消息与任务”UI 应用。图标可以在此处找到:
|
||||
|
||||
<figure class="image image_resized" style="width:75%" markdown="">  </figure>
|
||||
|
||||
```lua
|
||||
--guihooks.trigger('Message', {msg, ttl, category, icon})
|
||||
--ui_message(msg, ttl, category, icon)
|
||||
guihooks.trigger('Message', {msg = "Message Text Here", ttl = 5.0, category = "arrow_upward", icon = "arrow_upward"})
|
||||
guihooks.trigger('Message', {msg = "Message Text Here", ttl = 5.0, category = "arrow_downward", icon = "arrow_downward"})
|
||||
guihooks.trigger('Message', {msg = "Message Text Here", ttl = 5.0, category = "flag", icon = "flag"})
|
||||
guihooks.trigger('Message', {msg = "Message Text Here", ttl = 5.0, category = "check", icon = "check"})
|
||||
guihooks.trigger('Message', {msg = "Message Text Here", ttl = 5.0, category = "check_circle", icon = "check_circle"})
|
||||
guihooks.trigger('Message', {msg = "Message Text Here", ttl = 5.0, category = "warning", icon = "warning"})
|
||||
guihooks.trigger('Message', {msg = "Message Text Here", ttl = 5.0, category = "error", icon = "error"})
|
||||
guihooks.trigger('Message', {msg = "Message Text Here", ttl = 5.0, category = "directions_car", icon = "directions_car"})
|
||||
guihooks.trigger('Message', {msg = "Message Text Here", ttl = 5.0, category = "star", icon = "star"})
|
||||
guihooks.trigger('Message', {msg = "Message Text Here", ttl = 5.0, category = "timeline", icon = "timeline"})
|
||||
guihooks.trigger('Message', {msg = "Message Text Here", ttl = 5.0, category = "save", icon = "save"})
|
||||
guihooks.trigger('Message', {msg = "Message Text Here", ttl = 5.0, category = "settings", icon = "settings"})
|
||||
```
|
||||
|
||||
### 屏幕中央大尺寸或小尺寸闪烁显示
|
||||
|
||||
<figure class="image image_resized" style="width:75%" markdown="">  </figure>
|
||||
|
||||
<figure class="image image_resized" style="width:75%" markdown="">  </figure>
|
||||
|
||||
```lua
|
||||
--guihooks.trigger('ScenarioFlashMessage', {{msg, ttl, sound, big}} ) -- requires RaceCountdown ui app
|
||||
guihooks.trigger('ScenarioFlashMessage', {{"Message", 5.0, 0, true}} )
|
||||
guihooks.trigger('ScenarioFlashMessage', {{"Message Text Here", 5.0, 0, false}} )
|
||||
|
||||
--countdown example, when all executed at once, the items are queued and will follow eachother after the previous ttl expires
|
||||
guihooks.trigger('ScenarioFlashMessage', {{"3", 1.0, "Engine.Audio.playOnce('AudioGui', 'event:UI_Countdown1')", true}})
|
||||
guihooks.trigger('ScenarioFlashMessage', {{"2", 1.0, "Engine.Audio.playOnce('AudioGui', 'event:UI_Countdown2')", true}})
|
||||
guihooks.trigger('ScenarioFlashMessage', {{"1", 1.0, "Engine.Audio.playOnce('AudioGui', 'event:UI_Countdown3')", true}})
|
||||
guihooks.trigger('ScenarioFlashMessage', {{"GO!", 3.0, "Engine.Audio.playOnce('AudioGui', 'event:UI_CountdownGo')", true}})
|
||||
|
||||
--另一个声音示例
|
||||
guihooks.trigger('ScenarioFlashMessage', {{"Teleported!", 3.0, "Engine.Audio.playOnce('AudioGui', 'event:UI_Checkpoint')", false}})
|
||||
```
|
||||
|
||||
### 屏幕中央中等尺寸持久显示
|
||||
|
||||
这需要安装实时竞赛显示UI 应用。
|
||||
|
||||
<figure class="image image_resized" style="width:75%" markdown="">  </figure>
|
||||
|
||||
```lua
|
||||
--guihooks.trigger('ScenarioRealtimeDisplay', {msg = msg} ) -- 需要安装 Race Realtime Display UI 应用
|
||||
guihooks.trigger('ScenarioRealtimeDisplay', {msg = "在此输入消息文本"} )
|
||||
-- 这些消息会持久显示,可以通过发送空字符串来清除
|
||||
-- 如果您正在运行实时数据(例如计时器、距离计算等),这是一个非常适合快速更新的接口
|
||||
guihooks.trigger('ScenarioRealtimeDisplay', {msg = ""} )
|
||||
```
|
||||
|
||||
### 确认对话框
|
||||
|
||||
确认对话框是一个带有多达两个按钮的简化弹出窗口。
|
||||
|
||||
```lua
|
||||
-- 打开一个包含标题、正文文本和最多两个按钮的确认对话框(ConfirmationDialog)
|
||||
guihooks.trigger("ConfirmationDialogOpen",
|
||||
"示例标题",
|
||||
"示例正文文本内容",
|
||||
"确定",
|
||||
"", -- 对应的 gelua 代码,此处为空字符串
|
||||
"取消",
|
||||
"" -- 对应的 gelua 代码
|
||||
)
|
||||
|
||||
-- 关闭任何具有指定标题的已打开确认对话框
|
||||
guihooks.trigger("ConfirmationDialogClose", "示例标题")
|
||||
```
|
||||
|
||||
<figure class="image image_resized" style="width:75%" markdown="">  </figure>
|
||||
|
||||
按钮的两个字段都必须为字符串类型,按钮才会显示。
|
||||
|
||||
如果提供了确定按钮,按下 *确定 / 首要操作(OK / Primary action)* 键等同于点击“确定”按钮。
|
||||
|
||||
如果提供了取消按钮,按下 *菜单(Menu)*键等同于点击取消按钮。
|
||||
|
||||
支持HTML,例如可以用来添加图片或图标。
|
||||
|
||||
可以同时显示多个,并将按顺序排列显示。
|
||||
|
||||
!!! bug
|
||||
|
||||
```
|
||||
如果不提供任何按钮,玩家将无法在不使用控制台的情况下关闭或退出该对话框。
|
||||
```
|
||||
|
||||
!!! bug
|
||||
|
||||
```
|
||||
当 ConfirmationDialog(确认对话框)处于活动状态时,迷你地图UI应用的 SDF 部分仍然保持可见。
|
||||
|
||||
可以使用 `#!lua guihooks.trigger('ShowApps', false)` 隐藏 UI 应用,作为一种临时解决方案。
|
||||
```
|
||||
|
||||
<figure class="image image_resized" style="width:75%" markdown="">  </figure>
|
||||
|
||||
### introPopupTutorial
|
||||
|
||||
introPopupTutorial 是一个高度可定制的弹出窗口,很大程度上是通过嵌入式 HTML 来定义的。通常的做法是从一个独立的 HTML 文件中进行加载,该文件位于:`/gameplay/tutorials/pages/*/content.html`.
|
||||
|
||||
```lua
|
||||
guihooks.trigger("introPopupTutorial", {
|
||||
{
|
||||
content = readFile("/gameplay/tutorials/pages/template/content.html"):gsub("\r\n",""),
|
||||
flavour = "onlyOk"
|
||||
}
|
||||
})
|
||||
|
||||
guihooks.trigger("introPopupClose")
|
||||
```
|
||||
|
||||
<figure class="image image_resized" style="width:75%" markdown="">  </figure>
|
||||
|
||||
`flavour` 控制哪些按钮会被显示。共有四种类型:
|
||||
|
||||
- `withLogbook`
|
||||
- Buttons: Career Logbook, Okay
|
||||
- `onlyOk`
|
||||
- Buttons: Okay
|
||||
- `onlyLogbook`
|
||||
- Buttons: Career Logbook
|
||||
- `noButtons`
|
||||
- 不提供任何按钮
|
||||
|
||||
!!! 警告
|
||||
|
||||
```
|
||||
如果在页面中使用noButtons类型,且页面内容中没有提供额外的 JavaScript 来关闭该弹出窗口,则会导致游戏出现Softlock。在此类型下,多个页面不会合并到同一个弹出窗口中。因此,不建议使用此类型。
|
||||
```
|
||||
|
||||
如果提供了多个页面,或者该Hook被多次触发,这些页面将合并到同一个弹出窗口中。<br>如果在一个 introPopup 处于活动状态时触发该钩子,或者已经触发了另一种不同类型的 introPopup,则它会在当前窗口关闭后,在一个独立的弹出窗口中显示。
|
||||
|
||||
### introPopupCareer
|
||||
|
||||
introPopupCareer是一种易于使用且开放式Open-ended的弹出窗口,如果需要,它还支持嵌入 HTML 内容。
|
||||
|
||||
Flavours控制显示哪些按钮以及默认的图像长宽比。共有四种类型:
|
||||
|
||||
- `default`
|
||||
- Default image aspect ratio: 16x9
|
||||
- Buttons: Later, Okay
|
||||
- `welcome`
|
||||
- Default image aspect ratio: 16x9
|
||||
- Buttons: Career Logbook, Okay
|
||||
- `branch-info`
|
||||
- Default image aspect ratio: 16x9
|
||||
- Buttons: Career Logbook, Okay
|
||||
- `garage`
|
||||
- Buttons: Later, Okay
|
||||
|
||||
```lua
|
||||
guihooks.trigger("introPopupCareer", {
|
||||
{
|
||||
title = "Example title",
|
||||
text = "Example text",
|
||||
image = "/gameplay/tutorials/pages/template/image.jpg",
|
||||
ratio = "16x9",
|
||||
flavour = "default"
|
||||
}
|
||||
})
|
||||
|
||||
guihooks.trigger("introPopupClose")
|
||||
```
|
||||
|
||||
<figure class="image image_resized" style="width:75%" markdown=""> !在 BeamNG.drive 中显示的introPopupCareer代码片段](../../assets/content/introPopupCareer.png) </figure>
|
||||
|
||||
如果提供了多个页面,或者该Hook被多次触发,这些页面将被合并到同一个弹出窗口中。<br>如果在一个introPopup处于活动状态时触发了该钩子,或者已经触发了另一种不同类型的introPopup,那么它将在当前窗口关闭后,通过一个独立的弹出窗口进行显示。
|
||||
|
||||
!!! bug
|
||||
|
||||
```
|
||||
背景模糊具有最小高度限制,这会导致内容较少的弹出窗口在其窗口下方出现多余的模糊区域。目前主要有两种解决方法:
|
||||
|
||||
* 重复输入 `\n`(换行符)并在结尾添加 `#!html <div />`,直到窗口遮住模糊区域。
|
||||
* 使用空路径或缺失的 `image` 路径,并调整长宽比(Aspect Ratio),直到窗口遮住模糊区域。
|
||||
```
|
||||
|
||||
### introPopupMission
|
||||
|
||||
introPopupMission与 introPopupCareer几乎完全相同,但它需要手动定义按钮,而不是直接为按钮选择预设样式。
|
||||
|
||||
按钮样式组合为*bng-button-*`style`。内置的按钮样式包括:
|
||||
|
||||
- `main` - 橙色
|
||||
- `secondary` - 青色
|
||||
- `attention` - 红色
|
||||
- `white` - 白色
|
||||
- `link` - 半透明
|
||||
- `outline` - 橙色轮廓
|
||||
|
||||
```lua
|
||||
guihooks.trigger('introPopupMission', {
|
||||
title = "introPopupMission title",
|
||||
text = "introPopupMission description",
|
||||
image = "/gameplay/tutorials/pages/template/image.jpg",
|
||||
ratio = "16x9",
|
||||
buttons = {
|
||||
{ default=true, class="main", label="main button", clickLua="" },
|
||||
{ default=false, class="secondary", label="secondary button", clickLua="" },
|
||||
{ default=false, class="attention", label="attention button", clickLua="" },
|
||||
{ default=false, class="white", label="white button", clickLua="" },
|
||||
{ default=false, class="link", label="link button", clickLua="" },
|
||||
{ default=false, class="outline", label="outline button", clickLua="" }
|
||||
}
|
||||
})
|
||||
|
||||
guihooks.trigger("introPopupClose")
|
||||
```
|
||||
|
||||
<figure class="image image_resized" style="width:75%" markdown="">  </figure>
|
||||
|
||||
如果提供了多个页面,或者该Hook被多次触发,这些页面将合并到同一个弹出窗口中。<br>如果在一个introPopup处于活动状态时触发了该钩子,或者已经触发了另一种不同类型的 introPopup,则它会在当前窗口关闭后,通过一个独立的弹出窗口进行显示。
|
||||
|
||||
!!! bug
|
||||
|
||||
```
|
||||
背景模糊具有最小高度限制,这会导致内容较少的弹出窗口在其窗口下方出现多余的模糊区域。目前主要有两种解决方法:
|
||||
|
||||
* 重复输入 `\n`(换行符)并在结尾添加 `#!html <div />`,直到窗口拉长并遮住模糊区域。
|
||||
* 使用空路径或缺失的 `image`(图像)路径,并调整长宽比(Aspect Ratio),直到窗口覆盖住模糊区域。
|
||||
```
|
||||
|
||||
### 对话窗口
|
||||
|
||||
todo
|
||||
@@ -8,17 +8,19 @@
|
||||
这也可以在任何页面上完成。
|
||||
```
|
||||
|
||||
# BeamNG.drive代码片段
|
||||
# BeamNG.drive 代码的片段
|
||||
|
||||
## Lua代码片段
|
||||
|
||||
### 绘制标记和车辆检测
|
||||
### 世界
|
||||
|
||||
#### 绘制标记和车辆检测
|
||||
|
||||
在地图中绘制标记可能是向用户表明他们可以在那里进行某种形式的交互的最佳方式之一。
|
||||
|
||||
绘制标记相当容易。以下是如何绘制公交车路线标记的示例:
|
||||
|
||||
```Lua
|
||||
```lua
|
||||
local function createBusMarker(markerName)
|
||||
local marker = createObject('TSStatic')
|
||||
marker:setField('shapeName', 0, "art/shapes/interface/position_marker.dae")
|
||||
@@ -60,7 +62,7 @@
|
||||
|
||||
以下是来自[BeamNG-FuelStations](https://github.com/BeamMP/BeamNG-FuelStations/tree/master)的自定义标记示例:
|
||||
|
||||
```Lua
|
||||
```lua
|
||||
local stations = [
|
||||
{ "location": [ -778.813, 485.973, 23.46 ], "type":"gas" },
|
||||
{ "location": [ 617.164, -192.107, 53.2 ], "type":"ev" },
|
||||
@@ -93,11 +95,11 @@
|
||||
end
|
||||
```
|
||||
|
||||
### guihooks示例
|
||||
### 用户界面
|
||||
|
||||
#### Toast通知,位于屏幕右上角
|
||||
#### 屏幕右上角弹出的通知
|
||||
|
||||

|
||||
<figure class="image image_resized" style="width:75%" markdown="">  </figure>
|
||||
|
||||
```lua
|
||||
--guihooks.trigger('toastrMsg', {type, title, msg, config = {timeOut}})
|
||||
@@ -108,10 +110,13 @@ guihooks.trigger('toastrMsg', {type = "error", title = "Error Message:", msg = "
|
||||
|
||||
#### 消息通知,消息应用程序中默认位于屏幕左上角
|
||||
|
||||

|
||||
这需要'Messages' 或 'Messages & Tasks' UI 插件。图标文件可以在以下路径中找到 `ui\ui-vue\src\assets\fonts\bngIcons\svg这需要'Messages' 或 'Messages & Tasks' UI 插件。图标文件可以在以下路径中找到
|
||||
|
||||
<figure class="image image_resized" style="width:75%" markdown="">  </figure>
|
||||
|
||||
```lua
|
||||
--guihooks.trigger('Message', {msg, ttl, category, icon}) --requires Messages app
|
||||
--guihooks.trigger('Message', {msg, ttl, category, icon})
|
||||
--ui_message(msg, ttl, category, icon)
|
||||
guihooks.trigger('Message', {msg = "Message Text Here", ttl = 5.0, category = "arrow_upward", icon = "arrow_upward"})
|
||||
guihooks.trigger('Message', {msg = "Message Text Here", ttl = 5.0, category = "arrow_downward", icon = "arrow_downward"})
|
||||
guihooks.trigger('Message', {msg = "Message Text Here", ttl = 5.0, category = "flag", icon = "flag"})
|
||||
@@ -128,7 +133,9 @@ guihooks.trigger('Message', {msg = "Message Text Here", ttl = 5.0, category = "s
|
||||
|
||||
#### 位于中心,大,小型短暂显示
|
||||
|
||||

|
||||
<figure class="image image_resized" style="width:75%" markdown="">  </figure>
|
||||
|
||||
<figure class="image image_resized" style="width:75%" markdown="">  </figure>
|
||||
|
||||
```lua
|
||||
--guihooks.trigger('ScenarioFlashMessage', {{msg, ttl, sound, big}} ) -- requires RaceCountdown ui app
|
||||
@@ -147,7 +154,9 @@ guihooks.trigger('ScenarioFlashMessage', {{"Teleported!", 3.0, "Engine.Audio.pla
|
||||
|
||||
#### 位于中心,中型持续显示
|
||||
|
||||

|
||||
这需要 **“比赛实时显示 (Race Realtime Display)”** UI 插件。
|
||||
|
||||
<figure class="image image_resized" style="width:75%" markdown="">  </figure>
|
||||
|
||||
```lua
|
||||
--guihooks.trigger('ScenarioRealtimeDisplay', {msg = msg} ) -- requires Race Realtime Display ui app
|
||||
@@ -157,6 +166,218 @@ guihooks.trigger('ScenarioRealtimeDisplay', {msg = "Message Text Here"} )
|
||||
guihooks.trigger('ScenarioRealtimeDisplay', {msg = ""} )
|
||||
```
|
||||
|
||||
#### Confirmation Dialog
|
||||
|
||||
ConfirmationDialog是一种简单的弹出窗口,最多支持两个按钮。
|
||||
|
||||
```lua
|
||||
-- -- 打开一个包含标题、正文及最多两个按钮的Confirmation Dialog
|
||||
guihooks.trigger("ConfirmationDialogOpen",
|
||||
"Example Title",
|
||||
"Example Body Text",
|
||||
"Okay",
|
||||
"", --gelua. empty string
|
||||
"Cancel",
|
||||
"" --gelua
|
||||
)
|
||||
|
||||
-- 关闭任何具有指定标题且处于打开状态的确认对话框
|
||||
guihooks.trigger("ConfirmationDialogClose", "Example Title")
|
||||
```
|
||||
|
||||
<figure class="image image_resized" style="width:75%" markdown="">  </figure>
|
||||
|
||||
按钮的两个字段都必须是字符串,该按钮才能正常显示。
|
||||
|
||||
如果提供了Okay按钮,按下 *确定 / 主要动作 (OK / Primary action)*按键的效果等同于点击确定按钮。
|
||||
|
||||
如果提供了Cancel按钮,按下*菜单 (Menu)*按键的效果等同于点击取消按钮。
|
||||
|
||||
支持HTML格式,例如可以用来添加图像或图标。
|
||||
|
||||
可以同时显示多个,并将按顺序依次呈现。
|
||||
|
||||
!!! bug
|
||||
|
||||
```
|
||||
不提供任何按钮会导致玩家在不使用控制台的情况下无法退出该对话框。
|
||||
```
|
||||
|
||||
!!! bug
|
||||
|
||||
```
|
||||
当 **ConfirmationDialog**(确认对话框)处于活动状态时,小地图 (Minimap) UI 插件的 **SDF 部分** 依然保持可见。
|
||||
|
||||
可以使用 `#!lua guihooks.trigger('ShowApps', false)` 隐藏 UI 插件,作为一种临时性的补救方案。
|
||||
```
|
||||
|
||||
<figure class="image image_resized" style="width:75%" markdown="">  </figure>
|
||||
|
||||
#### introPopupTutorial
|
||||
|
||||
introPopupTutorial 是一种高度可定制的弹出窗口,其内容主要由嵌入式 HTML 定义。标准做法是从位于`/gameplay/tutorials/pages/*/content.html`的独立 HTML 文件中进行加载。
|
||||
|
||||
```lua
|
||||
guihooks.trigger("introPopupTutorial", {
|
||||
{
|
||||
content = readFile("/gameplay/tutorials/pages/template/content.html"):gsub("\r\n",""),
|
||||
flavour = "onlyOk"
|
||||
}
|
||||
})
|
||||
|
||||
guihooks.trigger("introPopupClose")
|
||||
```
|
||||
|
||||
<figure class="image image_resized" style="width:75%" markdown="">  </figure>
|
||||
|
||||
Flavours控制显示的按钮类型。共有四种预设模式:
|
||||
|
||||
- `withLogbook`
|
||||
- Buttons: Career Logbook, Okay
|
||||
- `onlyOk`
|
||||
- Buttons: Okay
|
||||
- `onlyLogbook`
|
||||
- Buttons: Career Logbook
|
||||
- `noButtons`
|
||||
- Provides no buttons
|
||||
|
||||
!!! 警告
|
||||
|
||||
```
|
||||
当页面使用noButtons模式时,如果页面内容中未提供用于关闭弹出窗口的额外 JavaScript 代码,则会导致软锁定。在这种模式下,多个页面不会合并到同一个弹出窗口中。因此,不建议使用该模式。
|
||||
```
|
||||
|
||||
如果提供了多个页面,或者该hook被多次触发,这些页面将合并到同一个弹出窗口中。<br>如果在introPopup处于活动状态时触发钩子,或者已经触发了另一种类型的introPopup,则新内容将在现有弹出窗口关闭后,以独立的弹出窗口形式显示。
|
||||
|
||||
#### introPopupCareer
|
||||
|
||||
introPopupCareer是一种易于使用且具有高度开放性的弹出窗口,如有需要,它还支持嵌入 HTML 内容。
|
||||
|
||||
Flavours控制显示的按钮类型以及默认的图像宽高比。共有四种预设模式:
|
||||
|
||||
- `default`
|
||||
- Default image aspect ratio: 16x9
|
||||
- Buttons: Later, Okay
|
||||
- `welcome`
|
||||
- Default image aspect ratio: 16x9
|
||||
- Buttons: Career Logbook, Okay
|
||||
- `branch-info`
|
||||
- Default image aspect ratio: 16x9
|
||||
- Buttons: Career Logbook, Okay
|
||||
- `garage`
|
||||
- Buttons: Later, Okay
|
||||
|
||||
```lua
|
||||
guihooks.trigger("introPopupCareer", {
|
||||
{
|
||||
title = "Example title",
|
||||
text = "Example text",
|
||||
image = "/gameplay/tutorials/pages/template/image.jpg",
|
||||
ratio = "16x9",
|
||||
flavour = "default"
|
||||
}
|
||||
})
|
||||
|
||||
guihooks.trigger("introPopupClose")
|
||||
```
|
||||
|
||||
<figure class="image image_resized" style="width:75%" markdown=""> !在BeamNG.drive中显示的introPopupCareer代码片段](../../assets/content/introPopupCareer.png) </figure>
|
||||
|
||||
如果提供了多个页面,或者该hook被多次触发,这些页面将合并到同一个弹出窗口中。<br>如果在introPopup处于活动状态时触发了hook,或者已经触发了另一种类型的introPopup,则新内容将在当前弹出窗口关闭后,以独立的弹出窗口形式显示。
|
||||
|
||||
!!! bug
|
||||
|
||||
```
|
||||
背景模糊具有最小高度限制,这会导致内容较短的弹出窗口下方出现多余的模糊区域。目前主要有两种规避方案:
|
||||
|
||||
* 重复输入 `\n` 并以 `#!html <div />` 结尾,直到窗口完全覆盖模糊区域。
|
||||
* 使用空路径或缺失的 `image` 路径,并调整宽高比(Aspect Ratio),直到窗口覆盖模糊区域。
|
||||
```
|
||||
|
||||
#### introPopupMission
|
||||
|
||||
introPopupMission与introPopupCareer几乎完全相同,但它需要手动定义按钮,而不是直接为按钮选择Flavour的预设模式。
|
||||
|
||||
按钮样式以 *bng-button-*`style` 的格式进行组合。内置的按钮样式包括:
|
||||
|
||||
- `main` - 橙色
|
||||
- `secondary` - 青色
|
||||
- `attention` - 红色
|
||||
- `white` - 白色
|
||||
- `link` - 半透明
|
||||
- `outline` - 橙色轮廓
|
||||
|
||||
```lua
|
||||
guihooks.trigger('introPopupMission', {
|
||||
title = "introPopupMission title",
|
||||
text = "introPopupMission description",
|
||||
image = "/gameplay/tutorials/pages/template/image.jpg",
|
||||
ratio = "16x9",
|
||||
buttons = {
|
||||
{ default=true, class="main", label="main button", clickLua="" },
|
||||
{ default=false, class="secondary", label="secondary button", clickLua="" },
|
||||
{ default=false, class="attention", label="attention button", clickLua="" },
|
||||
{ default=false, class="white", label="white button", clickLua="" },
|
||||
{ default=false, class="link", label="link button", clickLua="" },
|
||||
{ default=false, class="outline", label="outline button", clickLua="" }
|
||||
}
|
||||
})
|
||||
|
||||
guihooks.trigger("introPopupClose")
|
||||
```
|
||||
|
||||
<figure class="image image_resized" style="width:75%" markdown="">  </figure>
|
||||
|
||||
如果提供了多个页面,或者该hook被多次触发,这些页面将合并到同一个弹出窗口中。<br>如果在introPopup处于活动状态时触发了hook,或者已经触发了另一种类型的introPopup,则新内容将在当前弹出窗口关闭后,以独立的弹出窗口形式显示。
|
||||
|
||||
!!! bug
|
||||
|
||||
```
|
||||
背景模糊具有最小高度限制,这会导致内容较短的弹出窗口在其窗口下方出现多余的模糊区域。目前主要有两种规避方案:
|
||||
|
||||
* 重复使用 `\n` 并以 `#!html <div />` 结尾,直到窗口高度足以覆盖模糊区域。
|
||||
* 使用空路径或缺失的 `image` 路径,并调整宽高比(Aspect Ratio),直到窗口完全覆盖模糊区域。
|
||||
```
|
||||
|
||||
#### Dialogue
|
||||
|
||||
Dialogue被用于*A Rocky Start*活动中,用于显示有关任务的信息。它是一个居中且垂直对齐的弹出窗口,具有特定的布局。它不支持嵌入 HTML。
|
||||
|
||||
```lua
|
||||
ui_missionInfo.openDialogue({
|
||||
title = "Dialogue title",
|
||||
type = "Custom", -- isn't actually displayed
|
||||
typeName = "typeName",
|
||||
data = {
|
||||
{label = "objective", value = "reward"}
|
||||
-- add more...
|
||||
},
|
||||
buttons = {
|
||||
{action = "accept", text = "Accept", cmd = ""},
|
||||
{action = 'decline',text = "Decline", cmd = ""}
|
||||
-- add more...
|
||||
}
|
||||
})
|
||||
|
||||
ui_missionInfo.closeDialogue()
|
||||
```
|
||||
|
||||
<figure class="image image_resized" style="width:75%" markdown="">  </figure>
|
||||
|
||||
同时只能显示一个Dialogue。任何现有的Dialogue都会被直接覆盖。
|
||||
|
||||
!!! info
|
||||
|
||||
```
|
||||
`#!lua ui_missionInfo.closeDialogue()` 必须使用该函数来关闭对话框。
|
||||
|
||||
请确保在按下任何按钮时都调用此函数。
|
||||
```
|
||||
|
||||
## IMGUI代码片段
|
||||
|
||||
todo
|
||||
|
||||
## CEF UI代码片段
|
||||
|
||||
todo
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
---
|
||||
hide:
|
||||
- 导航
|
||||
---
|
||||
|
||||
# 欢迎来到BeamMP社区!
|
||||
|
||||
{width="450"} {width="450"}
|
||||
|
||||
## 我们的社交媒体链接
|
||||
|
||||
!!!failure ""
|
||||
|
||||
```
|
||||
BeamMP Forum - [https://forum.beammp.com](https://forum.beammp.com)
|
||||
```
|
||||
|
||||
!!!quote ""
|
||||
|
||||
```
|
||||
X (Twitter) - [https://x.com/BeamMPOfficial](https://x.com/BeamMPOfficial)
|
||||
```
|
||||
|
||||
!!!danger ""
|
||||
|
||||
```
|
||||
YouTube - [https://www.youtube.com/@BeamMPOfficial](https://www.youtube.com/@BeamMPOfficial)
|
||||
```
|
||||
|
||||
!!!warning ""
|
||||
|
||||
```
|
||||
Patreon - [https://www.patreon.com/c/BeamMP](https://www.patreon.com/c/BeamMP)
|
||||
```
|
||||
|
||||
!!!note ""
|
||||
|
||||
```
|
||||
Discord - [https://discord.com/invite/beammp](https://discord.com/invite/beammp)
|
||||
```
|
||||
|
||||
!!!info ""
|
||||
|
||||
```
|
||||
BlueSky - [https://bsky.app/profile/beammpofficial.bsky.social](https://bsky.app/profile/beammpofficial.bsky.social)
|
||||
```
|
||||
|
||||
## 我们的规则
|
||||
|
||||
你可以找到我们的规则 [这里](rules.md)
|
||||
@@ -0,0 +1,53 @@
|
||||
---
|
||||
hide:
|
||||
- 导航
|
||||
---
|
||||
|
||||
# BeamMP 社区规则
|
||||
|
||||
!!!BeamMP员工不受这些规则的严格约束,可以自行决定操作。除这些规则外,Discord的[社区指南](https://discord.com/guidelines/)和[服务条款](https://discord.com/terms/)也适用并强制执行。
|
||||
|
||||
## BeamMP通用规则(适用于Discord、论坛和游戏内)
|
||||
|
||||
1. 禁止歧视(如性别歧视、种族主义等):material-information-outline:{title=“这包括直接或有意使用种族/性侮辱或其他词汇来针对个人或群体。”}
|
||||
2. 禁止欺凌或骚扰:material-information-outline:{title=“这包括使用不必要的行为、未经请求的DM或使用信息、图像或口头交流针对个人。”}
|
||||
3. 无NSFW、冒犯性或恶意内容:material-information-outline:{title=“这包括包含恶意链接、裸露、色情、过度亵渎或其他冒犯性、恶意和/或不适合在公共场所出现的内容。”}
|
||||
4. 禁止发送垃圾邮件文本/语音渠道或帖子:material-information-outline:{title=“这包括生成多个帖子或线程,发送相同或类似的消息,滥用语音通信渠道或其他行为,包括加入/离开垃圾邮件。”}
|
||||
5. 请说英语:material-information-outline:{title=“在可能的情况下,BeamMP内部的所有通信都应使用英语,除非另有指定的特定区域。”}
|
||||
6. 禁止不适当的个人资料:material-information-outline:{title=“这包括个人资料名称,照片,bios或其他不符合BeamMP/BeamNG/Discord规则和ToS的用户控制内容。”}
|
||||
7. material-information-outline:{title=“禁止发布个人信息(” doxing ")(包括但不限于真实姓名、地址、电子邮件、密码、银行账户和信用卡信息等)。}
|
||||
8. material-information-outline:{title=“这包括讨论BeamMP/BeamNG或整个游戏之外的过去或当前世界事件。有一些地方可以对这些话题进行有效的讨论,但BeamMP不是其中之一。”}
|
||||
9. 非BeamMP/BeamNG内容:material-information-outline:{title="这包括非BeamMP社区、社交媒体渠道或其他外部链接。这适用于在BeamMP社区内发帖,以及以个人广告为目的主动向用户发送DM。”}
|
||||
10. 禁止冒充工作人员:material-information-outline:{title="这包括声称自己是BeamMP的工作人员,或声称拥有与工作人员相关的能力。这也包括模仿工作人员。”}
|
||||
11. 禁止利用:material-information-outline:{title=“这包括利用任何漏洞或疏忽来谋取个人利益或对他人的体验产生负面影响。”}
|
||||
12. 禁止分享 Authkey,禁止用小号刷免费密钥数量,违者永久封禁。
|
||||
13. 遵循所有给定的TOS:material-information-outline:{title=“这很重要,因为使用我们的Discord服务器也必须遵循诸如Discord年龄限制(13+)之类的限制。”}
|
||||
14. 尊重每个人:material-information-outline:{title=“有些话不该说出口,你需要尊重你周围的每个人,并相应地行动。”}
|
||||
15. 关注类别或频道的主题。:material-information-outline:{title="这应该不说出来,但要保持你的内容在你发布的区域的主题上。例如,支持应该帮助人们或在寻求支持时使用。”}
|
||||
16. 不要使用过多的大写锁定或表情符号:material-information-outline:{title=“用户应该避免使用过多的大写符号或表情符号/表情符号,以免混淆手头的重点。”}
|
||||
17. 在支持区域发布之前,请检查[BeamMP FAQ](../../support/player-faq.md) & [BeamMP社区FAQ](https://forum.beammp.com/c/faq/35)。
|
||||
|
||||
## Discord 规则
|
||||
|
||||
1. 以上规则适用于这里:material-information-outline:{title=“本文档中提到的所有规则适用于语音聊天。”}
|
||||
2. 遵循Discord的使用条款和指南:material-information-outline:{title=“遵循Discord在其使用条款和指南中列出的所有规则”}
|
||||
3. 禁止NSFW音频/流:material-information-outline:{title=“玩家不应该流任何违反BeamMP规则和Discord TOS的内容。”}
|
||||
4. 上述规则包括赌博服务/网站。
|
||||
5. material-information-outline:{title=“禁止过度使用响板、大声播放音乐或使用其他音频通道故意煽动或针对他人。”}
|
||||
6. 禁止加入/离开滥用:material-information-outline:{title=“大多数用户可能启用声音效果,不要快速加入和离开语音聊天。”}
|
||||
7. 不要纠缠他人(`@'ing`):material-information-outline:{title=“这包括在被忽视或拒绝后反复要求他人回应。”}
|
||||
8. 将bot命令保存在特定于命令的通道中。
|
||||
9. 禁止角色扮演:material-information-outline:{title=“这是为了防止由于缺少上下文或防止用户规避某些规则而引起的问题。”}
|
||||
10. 请勿要求用户通过私信(DM)向你寻求帮助。所有与支持相关的话题均应在 BeamMP Discord 服务器的指定支持频道中进行讨论。
|
||||
11. 严禁发送任何可疑的、潜在恶意或具有破坏性的文件及附件(包括但不限于可疑扩展名)。
|
||||
12. 不要教/发链接教别人怎么盗版、破解软件、骇入账号、破解付费mod。
|
||||
13. 不要发布非BeamNG /BeamMP内容。只允许在专用的[媒体通道](https://discord.com/channels/601558901657305098/705427325646274680)中发送您自己通道的媒体。
|
||||
14. 听从工作人员的指示。如果你认为某位员工滥用职权,直接通知他们的领导或项目管理人员。
|
||||
|
||||
## 如何对您被实施的封禁进行申诉:
|
||||
|
||||
### 封禁上诉可在<a href="https://docs.google.com/forms/d/1MaTPKM-MHQU5lUtxeOKz3C7OoI6Xbu5RX5AJdX-UOz4" class="inline-onebox">封禁上诉- BeamMP</a>提交。
|
||||
|
||||
所有禁令申诉都经过彻底调查,涉及至少两(2)名与本案无关的工作人员/审核小组成员。发出申诉的工作人员将被允许发表评论,但不会以其他方式参与申诉决定。这些上诉结果是最终的。BeamMP保留根据BeamMP社区规则(如上所述)、[Discord ToS](https://discord.com/terms)和其他因素允许或不允许成员的权利。
|
||||
|
||||
!!! 如果对您采取行动,您将被禁止创建新的Discord或BeamMP帐户来规避禁令。
|
||||
@@ -0,0 +1,24 @@
|
||||
# 错误代码
|
||||
|
||||
此页包含启动程序可能显示的所有错误代码。
|
||||
|
||||
---
|
||||
|
||||
代码 | 描述 | 可能的解决方案
|
||||
--- | --- | ---
|
||||
10048 | 其他东西占用了启动器端口 | 确保只运行了一个BeamMP-Launcher程序。或尝试重新启动电脑。
|
||||
10038 / 10060 / 10061 | 在此指定的IP和/或端口上没有服务器应答 | 若您为服务器所有者,请前往[BeamMP-Server](https://docs.beammp.com/server/create-a-server)核验端口转发规则及防火墙策略;若非所有者,请尝试切换其他服务器或联系已知管理员协同排障。
|
||||
10054 | 对方/服务器突然断开了连接 | 您正在连接的服务器已离线。
|
||||
Failed to find the game please launch it. Report this if the issue persists code 3. | 启动器无法在注册表项中找到游戏信息(游戏目录,配置文件目录,版本等) | 至少运行一次游戏,以便创建注册表值。
|
||||
Failed to find the game please launch it. Report this if the issue persists code 4. | 启动器无法从注册表项中读取游戏信息(游戏目录、配置文件目录、版本等) | 此错误最有可能出现在**盗版**游戏的用户中。如果你已经购买了游戏,至少运行一次,这样注册表值就会被创建。
|
||||
Failed to Launch the game! launcher closing soon | 启动器无法找到游戏的可执行文件 | 在再次运行启动器之前,至少运行一次游戏。
|
||||
Game Closed! launcher closing soon | 游戏关闭了 | 此消息将在游戏结束或游戏启动失败时出现。
|
||||
Launcher Update failed! | 启动器未能下载新版本 | 检查您的互联网连接和防火墙/防病毒规则,让启动器没有被阻止。
|
||||
Logger file init failed | 启动器缺乏文件创建权限 | 使用管理员身份运行启动器
|
||||
Please close the game and try again | 游戏已经打开,启动器无法清除`multiplayer/mod `文件夹 | 关闭游戏并重试
|
||||
Please launch the game at least once | 启动器尝试修改游戏目录但是失败了 | 在再次运行启动器之前,至少运行一次游戏。
|
||||
Primary Servers Offline! Sorry for the inconvenience! | 启动器未能检查更新 | 检查你的互联网连接和防火墙规则。如果您没有问题,请查看我们Discord上的[BeamMP更新频道](https://discord.com/channels/601558901657305098/697596153943949352)。
|
||||
Sorry Backend System Outage! Don't worry it will back on soon! | BeamMP后端没有响应 | 检查你的互联网连接和防火墙规则。如果您没有问题,请查看我们Discord上的[BeamMP更新频道](https://discord.com/channels/601558901657305098/697596153943949352)。
|
||||
Stuck on updating | 启动器卡在更新上,不会继续下一步 | 以管理员身份运行启动器并检查反病毒规则,以确保启动器未被阻止。
|
||||
|
||||
如果启动器迅速“闪退”了,请检查安装BeamMP的文件夹中的` launcher .log`文件。
|
||||